Socket
Socket
Sign inDemoInstall

@nuxtjs/axios

Package Overview
Dependencies
Maintainers
3
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.0.0-alpha.1 to 5.0.0-rc.0

10

CHANGELOG.md

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

<a name="5.0.0-rc.0"></a>
# [5.0.0-rc.0](https://github.com/nuxt-community/axios-module/compare/v5.0.0-alpha.1...v5.0.0-rc.0) (2018-01-28)
### Features
* support proxy ([0d3be17](https://github.com/nuxt-community/axios-module/commit/0d3be17))
<a name="5.0.0-alpha.1"></a>

@@ -7,0 +17,0 @@ # [5.0.0-alpha.1](https://github.com/nuxt-community/axios-module/compare/v5.0.0-alpha.0...v5.0.0-alpha.1) (2018-01-28)

14

lib/module.js

@@ -38,9 +38,8 @@ const chalk = require('chalk')

browserBaseURL: null,
proxyMode: false,
credentials: false,
debug: false,
progress: true,
proxyHeaders: true,
progress: true,
proxyHeadersIgnore: ['accept', 'host'],
debug: false,
disableDefaultErrorHandler: false
proxy: false
},

@@ -64,3 +63,3 @@ moduleOptions

if (!options.browserBaseURL) {
options.browserBaseURL = options.proxyMode ? prefix : options.baseURL
options.browserBaseURL = options.proxy ? prefix : options.baseURL
}

@@ -75,2 +74,7 @@

// Proxy integration
if (options.proxy) {
this.requireModule('@nuxtjs/proxy')
}
/* eslint-disable no-console */

@@ -77,0 +81,0 @@ debug(

{
"name": "@nuxtjs/axios",
"version": "5.0.0-alpha.1",
"version": "5.0.0-rc.0",
"description": "Secure and easy axios integration with Nuxt.js",

@@ -37,2 +37,3 @@ "license": "MIT",

"dependencies": {
"@nuxtjs/proxy": "^1.1.4",
"axios": "^0.17.1",

@@ -43,3 +44,2 @@ "chalk": "^2.3.0",

"devDependencies": {
"nuxt": "^1.1.1",
"codecov": "^3.0.0",

@@ -56,4 +56,5 @@ "eslint": "^4.14.0",

"jsdom": "^11.5.1",
"nuxt": "^1.1.1",
"standard-version": "^4.2.0"
}
}

@@ -1,5 +0,5 @@

<p align="center">
<img src="https://user-images.githubusercontent.com/5158436/30198986-d4c5d7f8-9485-11e7-9c3e-8b5f5f061f5f.png">
</p>
<h1 align="center">Axios</h1>
<p align="center"> Secure and Easy <a href="https://github.com/mzabriskie/axios">Axios</a> integration with Nuxt.js. </p>
<p align="center">

@@ -27,9 +27,5 @@ <a href="https://david-dm.org/nuxt-community/axios-module">

<h1 align="center">Axios</h1>
<p align="center"> Secure and Easy <a href="https://github.com/mzabriskie/axios">Axios</a> integration with Nuxt.js. </p>
[📖 Release Notes](./CHANGELOG.md)
If you are coming from an older release please be sure to read [Migration Guide](https://github.com/nuxt-community/axios-module/wiki/Migration-guide)
If you are coming from an older release please be sure to read [Migration Guide](https://github.com/nuxt-community/axios-module/wiki/Migration-guide).

@@ -42,4 +38,2 @@ ## Features

✓ Throws _nuxt-friendly_ errors and optionally redirect on specific error codes
✓ Automatically enables `withCredentials` when requesting to base URL

@@ -53,2 +47,4 @@

✓ Easily integrate with [Proxy Module](https://github.com/nuxt-community/proxy-module)
# Table of Contents

@@ -72,2 +68,3 @@

* [progress](#progress)
* [proxy](#proxy)
* [credentials](#credentials)

@@ -77,3 +74,2 @@ * [debug](#debug)

* [proxyHeadersIgnore](#proxyheadersignore)
* [disableDefaultErrorHandler](#disabledefaulterrorhandler)

@@ -162,8 +158,11 @@ ## Setup

```js
{
modules: [
'@nuxtjs/axios',
],
plugins: [
'~/plugins/axios'
]
}
```

@@ -306,3 +305,3 @@

* Default: `baseURL` (or `prefix` when `options.proxyMode` is `true`)
* Default: `baseURL` (or `prefix` when `options.proxy` is enabled)

@@ -319,2 +318,37 @@ Base URL which is used and prepended to make requests in client side.

### `proxy`
* Default: `false`
You can easily integrate Axios with [Proxy Module](https://github.com/nuxt-community/proxy-module) and is much recommended to prevent CORS and deployment problems.
**nuxt.config.js**
```js
{
modules: [
'@nuxtjs/axios'
],
axios: {
proxy: true
},
proxy: {
'/api/': 'http://api.example.com',
'/api2/': 'http://api.another-website.com'
}
}
```
**Note:** It is not required to manually register `@nuxtjs/proxy` module.
**Note:** `/api/` will be added to all requests to the API end point. If you need to remove it use `pathRewrite`:
```js
proxy: {
'/api/': { target: 'http://api.example.com', pathRewrite: {'^/api/', ''} }
}
```
### `credentials`

@@ -349,5 +383,4 @@

## License
[MIT License](./LICENSE) - Copyright (c) 2017 Nuxt Community
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