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