How to change base url #1581
-
Hello,
But it does not seem that its working. So, my question is, how can I change the baseUrl for this axios instance, without changing the main axios configuration. I have tried ovewriting the Auth class in the constructor, but it does not seem to work either
$auth.options.baseURL is set up in nuxt.config.js
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Currently there is no way to do this, the Auth module accesses the Axios Instance and does not use its own, the only way is to change the Axios configuration, nothing else comes to my mind. |
Beta Was this translation helpful? Give feedback.
-
Hello
|
Beta Was this translation helpful? Give feedback.
-
You need to change @nuxt/axios settings in nuxt.config.js file: LH_BACKEND_URL = 'localhost:8000'
|
Beta Was this translation helpful? Give feedback.
Hello
I found a solution to this:
You can specify what extra options can be passed to Auth's Axios directly from the nuxt-config.js