Version
v5.9.0
Reproduction link
https://github.com/meatherly/nuxtjs-axios-bug
Steps to reproduce
Set the common headers in the nuxt.config.js for the axios module. Then make a request with the axios module.
What is expected ?
It should merge the headers you add to the config with the default like the documentation says.
What is actually happening?
The headers are not changing.
Additional comments?
I've created a example repo to recreate the bug.
- Start up the project.
- Load the index page.
- Inspect the request to
https://jsonplaceholder.typicode.com/posts/1 in the dev tools.
You should see that the common header set in nuxt.config.js is missing from the request when it shouldn't be.
This bug report is available on Nuxt community (#c318)
Version
v5.9.0
Reproduction link
https://github.com/meatherly/nuxtjs-axios-bug
Steps to reproduce
Set the common headers in the nuxt.config.js for the axios module. Then make a request with the axios module.
What is expected ?
It should merge the headers you add to the config with the default like the documentation says.
What is actually happening?
The headers are not changing.
Additional comments?
I've created a example repo to recreate the bug.
https://jsonplaceholder.typicode.com/posts/1in the dev tools.You should see that the common header set in
nuxt.config.jsis missing from the request when it shouldn't be.