fanluyan 1 year ago
parent b4e7afa2fc
commit c118952a2e

@ -30,11 +30,11 @@ module.exports = defineConfig({
"/api": { "/api": {
//表示拦截以/api开头的请求路径 //表示拦截以/api开头的请求路径
//target: "http://180.166.218.222:40080", //dell服务器环境 target: "http://180.166.218.222:40080", //dell服务器环境
target: "http://192.168.50.42:8093/", //湖南 //target: "http://192.168.1.39:8093/", //湖南
changOrigin: true, //是否开启跨域 changOrigin: true, //是否开启跨域
pathRewrite: { pathRewrite: {
"^/api": "", //重写api把api变成空字符因为我们真正请求的路径是没有api的 "^/api": "/api", //重写api把api变成空字符因为我们真正请求的路径是没有api的
}, },
}, },
}, },

Loading…
Cancel
Save