Skip to content

Commit a923db3

Browse files
author
Pooya Parsa
committed
feat: passing options via proxy option
1 parent 0aa8fd5 commit a923db3

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ You can easily integrate Axios with [Proxy Module](https://github.com/nuxt-commu
324324
],
325325

326326
axios: {
327-
proxy: true
327+
proxy: true // Can be also an object with default options
328328
},
329329

330330
proxy: {

lib/module.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,10 @@ module.exports = function nuxtAxios (_moduleOptions) {
7373

7474
// Proxy integration
7575
if (options.proxy) {
76-
this.requireModule('@nuxtjs/proxy')
76+
this.requireModule([
77+
'@nuxtjs/proxy',
78+
typeof options.proxy === 'object' ? options.proxy : {}
79+
])
7780
}
7881

7982
/* eslint-disable no-console */

0 commit comments

Comments
 (0)