From 46415d647733ab10902c840f4827a7f95c10fc97 Mon Sep 17 00:00:00 2001 From: chenshuai2144 Date: Thu, 28 Oct 2021 09:31:08 +0800 Subject: [PATCH] docs: add proxy doc --- config/proxy.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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: {