@nuxtjs/axios
Advanced tools
Comparing version 5.12.3 to 5.12.4
@@ -5,2 +5,9 @@ # Changelog | ||
### [5.12.4](https://github.com/nuxt-community/axios-module/compare/v5.12.3...v5.12.4) (2020-12-14) | ||
### Bug Fixes | ||
* preserve default headers with custom headers ([#452](https://github.com/nuxt-community/axios-module/issues/452)) ([55f994f](https://github.com/nuxt-community/axios-module/commit/55f994f1627798f36174a14edd28fe7a5e4e70e7)) | ||
### [5.12.3](https://github.com/nuxt-community/axios-module/compare/v5.12.2...v5.12.3) (2020-11-30) | ||
@@ -7,0 +14,0 @@ |
@@ -64,7 +64,12 @@ import Axios from 'axios' | ||
// Intercept to apply default headers | ||
axios.onRequest((config) => { | ||
config.headers = { ...axios.defaults.headers.common, ...config.headers } | ||
}) | ||
// Setup interceptors | ||
<% if (options.debug) { %>setupDebugInterceptor(axios) <% } %> | ||
<% if (options.credentials) { %>setupCredentialsInterceptor(axios)<% } %> | ||
<% if (options.credentials) { %>setupCredentialsInterceptor(axios) <% } %> | ||
<% if (options.progress) { %>setupProgress(axios) <% } %> | ||
<% if (options.retry) { %>axiosRetry(axios, <%= serialize(options.retry) %>)<% } %> | ||
<% if (options.retry) { %>axiosRetry(axios, <%= serialize(options.retry) %>) <% } %> | ||
@@ -71,0 +76,0 @@ return axios |
{ | ||
"name": "@nuxtjs/axios", | ||
"version": "5.12.3", | ||
"version": "5.12.4", | ||
"description": "Secure and easy Axios integration with Nuxt.js", | ||
@@ -23,3 +23,3 @@ "repository": "nuxt-community/axios-module", | ||
"dependencies": { | ||
"@nuxtjs/proxy": "^2.0.1", | ||
"@nuxtjs/proxy": "^2.1.0", | ||
"axios": "^0.21.0", | ||
@@ -26,0 +26,0 @@ "axios-retry": "^3.1.9", |
44875
385
Updated@nuxtjs/proxy@^2.1.0