2024-11-04
2677
#js libraries
Nelson Michael
86520
Nov 4, 2024 â‹… 9 min read

Using Axios to set request headers

Nelson Michael Nelson Michael is a frontend developer from Nigeria. When he's not meddling with CSS, he spends his time writing, sharing what he knows, and playing games.

Recent posts:

Npm Vs. Npx: What’s The Difference?

npm vs. npx: What’s the difference?

Explore use cases for using npm vs. npx such as long-term dependency management or temporary tasks and running packages on the fly.

Fimber Elemuwa
Dec 3, 2024 â‹… 5 min read
How To Audit And Validate AI-Generated Code Output

How to audit and validate AI-generated code output

Validating and auditing AI-generated code reduces code errors and ensures that code is compliant.

Boemo Mmopelwa
Dec 2, 2024 â‹… 5 min read
Building A Background Remover With Vue And Transformers.js

Building a background remover with Vue and Transformers.js

Build a real-time image background remover in Vue using Transformers.js and WebGPU for client-side processing with privacy and efficiency.

Emmanuel John
Nov 29, 2024 â‹… 9 min read
Managing Search Parameters In Next.js With Nuqs

Managing search parameters in Next.js with nuqs

Optimize search parameter handling in React and Next.js with nuqs for SEO-friendly, shareable URLs and a better user experience.

Jude Miracle
Nov 27, 2024 â‹… 10 min read
View all posts

3 Replies to "Using Axios to set request headers"

  1. You have syntax errors in your examples – misplaced } with ` within template strings in both examples: axios.create and axios.interceptors.request.use

  2. I am facing Invalid Host Header..
    My vue.config.ts

    // vue.config.ts
    import { defineConfig } from ‘vite’;

    export default defineConfig({
    // Set the entry point for your application (main.ts)
    build: {
    rollupOptions: {
    input: ‘./src/main.ts’,
    },
    },
    server: {
    port: 8080,
    allowedHosts: [
    ‘courserev-dev-super-admin-dashboard-development-v-g4pfhuoefa-ue.a.run.app’,
    ],
    proxy: {
    // Add any proxy configurations if needed
    },
    },
    });

Leave a Reply