|
|
@@ -6,6 +6,10 @@ const service = axios.create({
|
|
|
})
|
|
|
|
|
|
service.interceptors.request.use(config => {
|
|
|
+ // is server render, use ${baseUrl} directly rather than ${proxyUrl}
|
|
|
+ if (process.env.proxyUrl && typeof window === 'undefined') {
|
|
|
+ config.url = process.env.baseUrl + config.url
|
|
|
+ }
|
|
|
return config
|
|
|
}, error => {
|
|
|
return Promise.reject(error)
|