diff --git a/packages/server/src/Server/Server.ts b/packages/server/src/Server/Server.ts index fe1d7fe56e31..bc5f3f20df46 100644 --- a/packages/server/src/Server/Server.ts +++ b/packages/server/src/Server/Server.ts @@ -278,10 +278,6 @@ class Server { return createProxyMiddleware(context!, { ...proxyConfig, onProxyReq(proxyReq, req: any, res) { - // 修改 host 模拟域名,避免 cors 只允许固定域名时报错 - if (proxyReq.getHeader('origin')) { - proxyReq.setHeader('origin', target); - } proxyConfig.onProxyReq?.(proxyReq, req, res); }, onProxyRes(proxyRes, req: any, res) {