Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
scscgit opened this issue Oct 20, 2020 · 0 comments
Closed

Comments

@scscgit
Copy link
Contributor

scscgit commented Oct 20, 2020

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: '/',
  },
...
}
scscgit added a commit to scscgit/create-nuxt-app that referenced this issue Jul 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant