Closed
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)
I'm trying to setup local proxy while it's working fine for all the requests, it doesn't work for POST requests including data. I have disabled bodyParser but it didn't help.
I also created an issue about this but it doesn't seems to be next.js issue but I'm not sure.
Issue:
vercel/next.js#36811
Discussion:
vercel/next.js#36859
Step-by-step reproduction instructions
1. create api in next project
2. send a post request including data (like a login api)
3. you will see that the request won't be resolved
Expected behavior (be clear and concise)
I expect to resolve the api with a response.
How is http-proxy-middleware used in your project?
=> Found "http-proxy-middleware@2.0.6"
info Has been hoisted to "http-proxy-middleware"
info This module exists because it's specified in "devDependencies".
info Disk size without dependencies: "184KB"
info Disk size with unique dependencies: "592KB"
info Disk size with transitive dependencies: "2.83MB"
info Number of shared dependencies: 11
✨ Done in 0.44s.
### What http-proxy-middleware configuration are you using?
```typescript
const proxy = createProxyMiddleware({
logLevel: 'debug',
target: 'XXX',
changeOrigin: true,
autoRewrite: true,
});
export default proxy;
What OS/version and node/version are you seeing the problem?
macOS, node 16
Additional context (optional)
No response