Socket
Socket
Sign inDemoInstall

@nuxtjs/axios

Package Overview
Dependencies
Maintainers
4
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.3.4 to 5.3.5

11

CHANGELOG.md

@@ -5,2 +5,13 @@ # Change Log

<a name="5.3.5"></a>
## [5.3.5](https://github.com/nuxt-community/axios-module/compare/v5.3.4...v5.3.5) (2018-11-07)
### Bug Fixes
* **defaults:** ignore `cf-ray` and `cf-connecting-ip` headers on server side ([#20](https://github.com/nuxt-community/axios-module/issues/20)) ([#175](https://github.com/nuxt-community/axios-module/issues/175)) ([3ae5416](https://github.com/nuxt-community/axios-module/commit/3ae5416))
* **defaults:** set proper Accept-Encoding for server side ([#176](https://github.com/nuxt-community/axios-module/issues/176)) ([c84fb56](https://github.com/nuxt-community/axios-module/commit/c84fb56))
<a name="5.3.4"></a>

@@ -7,0 +18,0 @@ ## [5.3.4](https://github.com/nuxt-community/axios-module/compare/v5.3.3...v5.3.4) (2018-10-30)

2

lib/module.js

@@ -43,3 +43,3 @@ const path = require('path')

proxyHeaders: true,
proxyHeadersIgnore: ['accept', 'host'],
proxyHeadersIgnore: ['accept', 'host', 'cf-ray', 'cf-connecting-ip'],
proxy: false,

@@ -46,0 +46,0 @@ retry: false,

@@ -151,24 +151,31 @@ import Axios from 'axios'

export default (ctx, inject) => {
const axiosOptions = {
// baseURL
baseURL : process.browser
// baseURL
const baseURL = process.browser
? '<%= options.browserBaseURL %>'
: (process.env._AXIOS_BASE_URL_ || '<%= options.baseURL %>'),
: (process.env._AXIOS_BASE_URL_ || '<%= options.baseURL %>')
// Create fresh objects for all default header scopes
// Axios creates only one which is shared across SSR requests!
// https://github.com/mzabriskie/axios/blob/master/lib/defaults.js
headers: {
common : {
'Accept': 'application/json, text/plain, */*'
},
delete: {},
get: {},
head: {},
post: {},
put: {},
patch: {}
}
// Create fresh objects for all default header scopes
// Axios creates only one which is shared across SSR requests!
// https://github.com/mzabriskie/axios/blob/master/lib/defaults.js
const headers = {
common : {
'Accept': 'application/json, text/plain, */*'
},
delete: {},
get: {},
head: {},
post: {},
put: {},
patch: {}
}
if (process.server) {
headers.common['Accept-Encoding'] = 'gzip, deflate'
}
const axiosOptions = {
baseURL,
headers
}
<% if (options.proxyHeaders) { %>

@@ -175,0 +182,0 @@ // Proxy SSR request headers headers

{
"name": "@nuxtjs/axios",
"version": "5.3.4",
"version": "5.3.5",
"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