mirror of
https://gitee.com/log4j/pig-ui.git
synced 2024-12-23 05:40:20 +08:00
end:跨域配置
This commit is contained in:
parent
e788c476b3
commit
edf2a1b155
@ -24,15 +24,25 @@ module.exports = {
|
||||
},
|
||||
dev: {
|
||||
env: require('./dev.env'),
|
||||
port: 9527,
|
||||
port: 9528,
|
||||
autoOpenBrowser: true,
|
||||
assetsSubDirectory: 'static',
|
||||
assetsPublicPath: '/',
|
||||
proxyTable: {
|
||||
'/auth': {
|
||||
target: 'http://127.0.0.1:2000',
|
||||
changeOrigin: true
|
||||
}
|
||||
target: 'http://127.0.0.1:1000',
|
||||
changeOrigin: true,
|
||||
pathRewrite: {
|
||||
'^/auth' : '/auth'
|
||||
}
|
||||
},
|
||||
'/admin': {
|
||||
target: 'http://127.0.0.1:1000',
|
||||
changeOrigin: true,
|
||||
pathRewrite: {
|
||||
'^/admin' : '/admin'
|
||||
}
|
||||
},
|
||||
},
|
||||
cssSourceMap: false
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ import { getToken } from '@/utils/auth'
|
||||
|
||||
// 创建axios实例
|
||||
const service = axios.create({
|
||||
baseURL: process.env.BASE_API, // api的base_url
|
||||
// baseURL: process.env.BASE_API, // api的base_url
|
||||
timeout: 5000 // 请求超时时间
|
||||
})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user