赞
踩
"h5" : { "router" : { "mode" : "history" }, "devServer" : { "disableHostCheck" : true, "proxy" : { "/api" : { "target" : "请求的地址", "changeOrigin" : true, //是否跨域 "secure" : false, // 设置支持https协议的代理 "ws" : false, "pathRewrite" : { "^/api" : "" } } } } }
server: {
disableHostCheck: true,
proxy: {
'/api': {
target: '请求的地址',
changeOrigin: true,
// rewrite: path => path.replace(/^\/api/, '')
},
}
}
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。