Skip to content

Commit

Permalink
feat: passing options via proxy option
Browse files Browse the repository at this point in the history
  • Loading branch information
Pooya Parsa committed Feb 4, 2018
1 parent 0aa8fd5 commit a923db3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ You can easily integrate Axios with [Proxy Module](https://github.com/nuxt-commu
],

axios: {
proxy: true
proxy: true // Can be also an object with default options
},

proxy: {
Expand Down
5 changes: 4 additions & 1 deletion lib/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,10 @@ module.exports = function nuxtAxios (_moduleOptions) {

// Proxy integration
if (options.proxy) {
this.requireModule('@nuxtjs/proxy')
this.requireModule([
'@nuxtjs/proxy',
typeof options.proxy === 'object' ? options.proxy : {}
])
}

/* eslint-disable no-console */
Expand Down

0 comments on commit a923db3

Please sign in to comment.