api.js
798 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import { version } from '../package.json';
/**
* api 관련된 nuxt 옵션을 정리합니다.
* 해당 옵션은 아래와 같습니다.
* auth, axios, proxy,
*/
export default {
// Axios module configuration: https://go.nuxtjs.dev/config-axios
axios: {
proxy: true,
retry: { retries: 3 },
// baseUrl: 'http://localhost:5555',
headers: {
common: {
Accept: 'application/json, text/plain, */*',
AppVersion: version,
},
delete: {},
get: {},
head: {},
post: {},
put: {},
patch: {},
},
},
proxy: {
'/api': {
target: process.env.BASE_API_URL || 'http://14.33.35.148:20205',
pathRewrite: {
'^/api': '',
},
changeOrigin: true,
},
},
auth: {
// Options
},
};