@nuxtjs/axios
Advanced tools
Comparing version 5.4.2 to 5.5.0
@@ -5,2 +5,17 @@ # Change Log | ||
# [5.5.0](https://github.com/nuxt-community/axios-module/compare/v5.4.2...v5.5.0) (2019-05-22) | ||
### Bug Fixes | ||
* lowercase `accept-encoding` header (nuxt/http[#43](https://github.com/nuxt-community/axios-module/issues/43)) ([c17fec2](https://github.com/nuxt-community/axios-module/commit/c17fec2)) | ||
### Features | ||
* convert header names to lowercase (nuxt/http[#45](https://github.com/nuxt-community/axios-module/issues/45)) ([2e514a4](https://github.com/nuxt-community/axios-module/commit/2e514a4)) | ||
* use `server` of nuxt.config.js to set default baseURL ([#245](https://github.com/nuxt-community/axios-module/issues/245)) ([e1120a9](https://github.com/nuxt-community/axios-module/commit/e1120a9)) | ||
## [5.4.1](https://github.com/nuxt-community/axios-module/compare/v5.4.0...v5.4.1) (2019-03-05) | ||
@@ -7,0 +22,0 @@ |
@@ -16,2 +16,3 @@ const path = require('path') | ||
process.env.npm_package_config_nuxt_port || | ||
(this.options.server && this.options.server.port) || | ||
3000 | ||
@@ -25,2 +26,3 @@ | ||
process.env.npm_package_config_nuxt_host || | ||
(this.options.server && this.options.server.host) || | ||
'localhost' | ||
@@ -27,0 +29,0 @@ |
@@ -7,2 +7,4 @@ import Axios from 'axios' | ||
setHeader (name, value, scopes = 'common') { | ||
name = name.toLowerCase() | ||
for (let scope of Array.isArray(scopes) ? scopes : [ scopes ]) { | ||
@@ -18,3 +20,3 @@ if (!value) { | ||
const value = !token ? null : (type ? type + ' ' : '') + token | ||
this.setHeader('Authorization', value, scopes) | ||
this.setHeader('authorization', value, scopes) | ||
}, | ||
@@ -186,3 +188,3 @@ onRequest(fn) { | ||
// Don't accept brotli encoding because Node can't parse it | ||
axiosOptions.headers.common['Accept-Encoding'] = 'gzip, deflate' | ||
axiosOptions.headers.common['accept-encoding'] = 'gzip, deflate' | ||
} | ||
@@ -189,0 +191,0 @@ |
{ | ||
"name": "@nuxtjs/axios", | ||
"version": "5.4.2", | ||
"version": "5.5.0", | ||
"description": "Secure and easy axios integration with Nuxt.js", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
31508
300
0