-
-
Notifications
You must be signed in to change notification settings - Fork 251
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Version
System:
OS: Windows 11 10.0.22631
CPU: (32) x64 AMD Ryzen 9 7945HX with Radeon Graphics
Memory: 2.00 GB / 15.69 GB
Browsers:
Edge: Chromium (127.0.2651.105)
Internet Explorer: 11.0.22621.3527
npmPackages:
@rsbuild/core: 1.0.18 => 1.0.18
@rsbuild/plugin-vue2: ^1.0.1 => 1.0.1
Details
'/a.path/': {
target: process.env.VUE_APP_BASE_URL,
changeOrigin: true,
onProxyReq: function (proxyReq, req, res) {
res.redirect(`https://some.xx.com${req._parsedUrl.path}`);
return true;
},
},
TypeError: res.redirect is not a function
at ProxyServer.onProxyReq (D:/Workspaces/WebProjects/leadal/cis-workspace/rsbuild.config.mjs:179:15)
at ProxyServer.emit (D:\Workspaces\WebProjects\leadal\cis-workspace\node_modules\.pnpm\@rsbuild+core@1.0.18\node_modules\@rsbuild\core\compiled\http-proxy-middleware\index.js:705:35)
at ClientRequest.<anonymous> (D:\Workspaces\WebProjects\leadal\cis-workspace\node_modules\.pnpm\@rsbuild+core@1.0.18\node_modules\@rsbuild\core\compiled\http-proxy-middleware\index.js:2709:22)
at ClientRequest.emit (node:events:519:28)
at tickOnSocket (node:_http_client:843:7)
at onSocketNT (node:_http_client:906:5)
at process.processTicksAndRejections (node:internal/process/task_queues:83:21)
Node.js v20.18.0
ELIFECYCLE Command failed with exit code 1.
Reproduce link
https://codesandbox.io/p/github/rspack-contrib/rsbuild-codesandbox-example/main
Reproduce Steps
pnpm i
pnpm dev
- check the logs
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working