You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/content/en/options.md
+9-10Lines changed: 9 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,18 +5,22 @@ position: 4
5
5
category: 'Getting started'
6
6
---
7
7
8
-
9
8
You can pass different options using module inline options:
10
9
11
-
```
12
-
['@nuxtjs/axios', { proxy: true }]
10
+
```js
11
+
exportdefault {
12
+
modules: [
13
+
['@nuxtjs/axios', { proxy:true }]
14
+
]
15
+
}
13
16
```
14
17
15
18
or `axios` section in `nuxt.config.js`:
16
19
17
20
**nuxt.config.js**
18
-
```
19
-
{
21
+
22
+
```js
23
+
exportdefault {
20
24
modules: [
21
25
'@nuxtjs/axios'
22
26
],
@@ -70,7 +74,6 @@ They can be customized with `API_PREFIX`, `API_HOST` (or `HOST`) and `API_PORT`
70
74
71
75
Default value of `prefix` is `/`.
72
76
73
-
74
77
## `baseURL`
75
78
76
79
* Default: `http://[HOST]:[PORT][PREFIX]`
@@ -81,7 +84,6 @@ Environment variable `API_URL` can be used to **override** `baseURL`.
81
84
82
85
**WARNING:**`baseURL` and `proxy` cannot be used at the same time, so when the `proxy` option is in use, you need to define `prefix` instead of `baseURL`.
83
86
84
-
85
87
## `browserBaseURL`
86
88
87
89
* Default: `baseURL`
@@ -91,15 +93,12 @@ Defines the base URL which is used and prepended to make client side requests.
91
93
92
94
The environment variable `API_URL_BROWSER` can be used to **override**`browserBaseURL`.
93
95
94
-
95
96
## `https`
96
97
97
98
* Default: `false`
98
99
99
100
If set to `true`, `http://` in both `baseURL` and `browserBaseURL` will be changed into `https://`.
0 commit comments