From 0b4b0b14ba70d31fd796f6464bfb06db326942c9 Mon Sep 17 00:00:00 2001 From: Tony Han Date: Wed, 28 Dec 2022 10:47:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dapi=20=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E9=97=AE=E9=A2=98=20(#10453)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/proxy.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/config/proxy.ts b/config/proxy.ts index 59e3d82e..075d3c03 100644 --- a/config/proxy.ts +++ b/config/proxy.ts @@ -10,7 +10,18 @@ * @doc https://umijs.org/docs/guides/proxy */ export default { - dev: {}, + // 如果需要自定义本地开发服务器 请取消注释按需调整 + // dev: { + // // localhost:8000/api/** -> https://preview.pro.ant.design/api/** + // '/api/': { + // // 要代理的地址 + // target: 'https://preview.pro.ant.design', + // // 配置了这个可以从 http 代理到 https + // // 依赖 origin 的功能可能需要这个,比如 cookie + // changeOrigin: true, + // }, + // }, + /** * @name 详细的代理配置 * @doc https://github.com/chimurai/http-proxy-middleware