vue-element-admin icon indicating copy to clipboard operation
vue-element-admin copied to clipboard

跨域配置无效

Open JackFan90 opened this issue 5 years ago • 4 comments

1.删除mock相关 2.proxy配置如下: proxy: { '/api': { target: 'http://localhost:8080', // API服务器的地址 ws: true, // 代理websockets changeOrigin: true, // 虚拟的站点需要更管origin pathRewrite: { // 重写路径 比如'/api/aaa/ccc'重写为'/aaa/ccc' '^/api': '' } } } 3.baseURL='/api' 4.执行登录方法,报404,,http:localhost:9527/api/user/login找不到,无法把URL转到http:localhost:8080, 前端小白,不知如何解决,望大家指点,感谢!

JackFan90 avatar Mar 22 '20 03:03 JackFan90