vue3 项目在 vue.config.js 中做了下面的代理配置:
const PROXY_LIST = {
"/dev": {
target: "http://lcoalhost:7076",
changeOrigin: true,
pathRewrite: {
"^/dev": "/api"
}
}
};
我想打印出经过代理后的真实的 URL 要怎么做?
vue3 前端登录后,chrome 网络中的信息如下:(完整)
preview 标签页中显示:
Proxy error: Could not proxy request /gsms/login/in from localhost:9000 to http://lcoalhost:7076 (ENOTFOUND).
target: "http://lcoalhost:7076",
换成target: "http://www.lilnong.top/cors/",
正好我有个服务能看。其实你这里代理过去是
http://lcoalhost:7076/api/*