Commit a959393d authored by 徐来柯's avatar 徐来柯

update

parent a53f803d
...@@ -21,26 +21,27 @@ module.exports = { ...@@ -21,26 +21,27 @@ module.exports = {
devServer: { devServer: {
open: true, //项目运行自动打开浏览器 open: true, //项目运行自动打开浏览器
proxy: { proxy: {
'/api': {
//这里最好有一个 /
target: 'http://192.168.1.180:8802', // 后台接口域名
ws: true, //如果要代理 websockets,配置这个参数
secure: false, // 如果是https接口,需要配置这个参数
changeOrigin: true, //是否跨域
pathRewrite: {
'^/api': '/api',
}
}
// '/api': { // '/api': {
// //这里最好有一个 / // //这里最好有一个 /
// target: 'http://192.168.1.237:8802', // 后台接口域名 // target: 'http://192.168.1.180:8802', // 后台接口域名
// ws: true, //如果要代理 websockets,配置这个参数 // ws: true, //如果要代理 websockets,配置这个参数
// secure: false, // 如果是https接口,需要配置这个参数 // secure: false, // 如果是https接口,需要配置这个参数
// changeOrigin: true, //是否跨域 // changeOrigin: true, //是否跨域
// pathRewrite: { // pathRewrite: {
// '^/api': '/api' // '^/api': '/api',
// } // }
// } // }
'/api': {
//这里最好有一个 /
// 192.168.1.237 192.168.1.125
target: 'http://192.168.1.125:8802', // 后台接口域名
ws: true, //如果要代理 websockets,配置这个参数
secure: false, // 如果是https接口,需要配置这个参数
changeOrigin: true, //是否跨域
pathRewrite: {
'^/api': '/api'
}
}
} }
}, },
css: { css: {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment