Socket
Socket
Sign inDemoInstall

@nuxtjs/axios

Package Overview
Dependencies
Maintainers
6
Versions
86
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nuxtjs/axios - npm Package Compare versions

Comparing version 5.4.2 to 5.5.0

15

CHANGELOG.md

@@ -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 @@

2

lib/module.js

@@ -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 @@

6

lib/plugin.js

@@ -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",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc