Socket
Socket
Sign inDemoInstall

@nuxtjs/axios

Package Overview
Dependencies
25
Maintainers
4
Versions
86
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 5.12.5 to 5.13.0

12

CHANGELOG.md

@@ -5,2 +5,14 @@ # Changelog

## [5.13.0](https://github.com/nuxt-community/axios-module/compare/v5.12.5...v5.13.0) (2021-02-01)
### Features
* support baseUrl and browserBaseUrl to handle casing typos ([8904847](https://github.com/nuxt-community/axios-module/commit/890484755c1897da8dd80c155fba2328c05f58f8))
### Bug Fixes
* add `x-forwarded-port` and `x-forwarded-proto` to `proxyHeaderIgnore` defaults ([#465](https://github.com/nuxt-community/axios-module/issues/465)) ([a1a1894](https://github.com/nuxt-community/axios-module/commit/a1a189486d63356433c939529d6e631f3fc9f923))
### [5.12.5](https://github.com/nuxt-community/axios-module/compare/v5.12.4...v5.12.5) (2021-01-04)

@@ -7,0 +19,0 @@

23

lib/module.js

@@ -59,2 +59,12 @@ const path = require('path')

// Support baseUrl alternative
if (moduleOptions.baseUrl) {
moduleOptions.baseURL = moduleOptions.baseUrl
delete moduleOptions.baseUrl
}
if (moduleOptions.browserBaseUrl) {
moduleOptions.browserBaseURL = moduleOptions.browserBaseUrl
delete moduleOptions.browserBaseUrl
}
// Apply defaults

@@ -68,3 +78,14 @@ const options = defu(moduleOptions, {

proxyHeaders: true,
proxyHeadersIgnore: ['accept', 'host', 'x-forwarded-host', 'cf-ray', 'cf-connecting-ip', 'content-length', 'content-md5', 'content-type'],
proxyHeadersIgnore: [
'accept',
'cf-connecting-ip',
'cf-ray',
'content-length',
'content-md5',
'content-type',
'host',
'x-forwarded-host',
'x-forwarded-port',
'x-forwarded-proto'
],
proxy: false,

@@ -71,0 +92,0 @@ retry: false,

4

lib/plugin.js

@@ -197,4 +197,4 @@ import Axios from 'axios'

const baseURL = process.browser
? (runtimeConfig.browserBaseURL || runtimeConfig.baseURL || '<%= options.browserBaseURL || '' %>')
: (runtimeConfig.baseURL || process.env._AXIOS_BASE_URL_ || '<%= options.baseURL || '' %>')
? (runtimeConfig.browserBaseURL || runtimeConfig.browserBaseUrl || runtimeConfig.baseURL || runtimeConfig.baseUrl || '<%= options.browserBaseURL || '' %>')
: (runtimeConfig.baseURL || runtimeConfig.baseUrl || process.env._AXIOS_BASE_URL_ || '<%= options.baseURL || '' %>')

@@ -201,0 +201,0 @@ // Create fresh objects for all default header scopes

{
"name": "@nuxtjs/axios",
"version": "5.12.5",
"version": "5.13.0",
"description": "Secure and easy Axios integration with Nuxt.js",

@@ -5,0 +5,0 @@ "repository": "nuxt-community/axios-module",

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc