import http from 'http'
server: {
open: true,
// https: true,
host: '0.0.0.0',
proxy: {
'/api': {
//本地ip替换为127.0.0.1
target: 'http://127.0.0.1:9999',
changeOrigin: true,
secure: false, // 如果是https接口,需要配置这个参数
agent: new http.Agent(),
// rewrite: (path) => path.replace(/^\/api/, ''),
},
},
},
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交