diff --git a/config/proxy.ts b/config/proxy.ts index 5ef6a125..a8194b7e 100644 --- a/config/proxy.ts +++ b/config/proxy.ts @@ -8,10 +8,13 @@ */ export default { dev: { + // localhost:8000/api/** -> https://preview.pro.ant.design/api/** '/api/': { + // 要代理的地址 target: 'https://preview.pro.ant.design', + // 配置了这个可以从 http 代理到 https + // 依赖 origin 的功能可能需要这个,比如 cookie changeOrigin: true, - pathRewrite: { '^': '' }, }, }, test: {