Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

[axios module] uses improper default baseURL of hard-coded localhost:3000 #641

@scscgit

Description

@scscgit

As mentioned by axios-module issue nuxt-community/axios-module#308 when making a call using a relative path like this.$axios.get('/staticFile'), the baseURL (also available at this.$axios.defaults.baseURL) is hard-coded as localhost:3000, which can be addressed by configuring baseURL: '/' in nuxt.config.js (or .ts, I think you could replace the .js when TypeScript is chosen - and when you do so, you'll realize tsconfig.json also lacks vuetify type, just like @nuxtjs/axios for axios).

export default {
...
  axios: {
    baseURL: '/',
  },
...
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions