Open
Description
Checks
- I understand project setup issues should be asked on StackOverflow or in GitHub Discussions.
- I updated to latest
http-proxy-middleware
.
Describe the bug (be clear and concise)
With the following
app.use(
createProxyMiddleware('/api/v1/xyz', {
target: 'https://example.com/api/v1/xyz',
changeOrigin: true,
})
);
if a request is being made https://myapp.com/api/v1/xyz?param1=value
the proxied request is translating to https://example.com/api/v1/xyz/?param1=value
resulting in 404. ( Extra / is being added )
This was not the case with v2 and even with v3 legacy mode.
Step-by-step reproduction instructions
1. Add proxy as described above
2. send the request with query params
Expected behavior (be clear and concise)
No "/" should be added,
How is http-proxy-middleware used in your project?
[email protected] proxy-app
├── [email protected]
└─┬ [email protected]
└─┬ [email protected]
└── [email protected]
What http-proxy-middleware configuration are you using?
app.use(
createProxyMiddleware('/api/v1/xyz', {
target: 'https://example.com/api/v1/xyz',
changeOrigin: true,
})
);
### What OS/version and node/version are you seeing the problem?
```shell
Windows 11, Node 20
Additional context (optional)
No response