webpack配置域名
This commit is contained in:
@@ -74,15 +74,21 @@ const config = {
|
||||
// HOST: '"/api"'
|
||||
// },
|
||||
devServer: {
|
||||
// host: 'nomad.hackrobot.cn', // 替换为您的域名
|
||||
// port: 10086, // 选择一个适当的端口号
|
||||
proxy: {
|
||||
'/api/': {
|
||||
target: JSON.parse('"http://localhost:8055"'), //本地调试端口
|
||||
target: JSON.parse('"http://localhost:8700"'), //本地调试端口
|
||||
pathRewrite: {
|
||||
'^/api/': '/'
|
||||
},
|
||||
changeOrigin: true
|
||||
}
|
||||
}
|
||||
},
|
||||
// 允许特定域名访问
|
||||
allowedHosts: [
|
||||
'nomad.hackrobot.cn'
|
||||
],
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user