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:

how to hide scrollbars with CSS

How to use CSS to hide scrollbars without impacting scrolling

Learn how to hide the scrollbar in popular web browsers by making use of modern CSS techniques, and dive into some interactive examples.

Fimber Elemuwa
Mar 4, 2025 â‹… 10 min read

16 React component libraries and kits for improved UI

Discover 16 of the most useful React content libraries and kits, and learn how to use them in your next React app.

Chidume Nnamdi
Mar 4, 2025 â‹… 16 min read
typescript vs javascript

TypeScript vs. JavaScript: Differences and use cases for each

Choosing between TypeScript and JavaScript depends on your project’s complexity, team structure, and long-term goals.

Kayode Adeniyi
Mar 4, 2025 â‹… 4 min read
Understanding UUIDs In Node.js

Understanding UUIDs in Node.js

Generate and validate UUIDs in Node.js using libraries like `uuid`, `short-uuid`, and `nanoid`, covering UUID versions and best practices.

Ukeje Goodness
Mar 3, 2025 â‹… 7 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