Closed pascalverlinden closed 1 year ago
Not clear which issues you already looked at and what you already tried... Would be nice if you could list them.
Guessing you already explored https://github.com/chimurai/http-proxy-middleware/issues/40#issuecomment-163398924 and changed the order of the proxy and express.json()
;
Alternatively you could try to configure the fixRequestBody
in onProxyReq
:
https://github.com/chimurai/http-proxy-middleware/tree/v2.0.6#intercept-and-manipulate-requests
Thanks @chimurai I searched the issues for the same problem and tried to change the order of the middlewares. I also tried with fixRequestBody.
Checks
http-proxy-middleware
.Describe the bug (be clear and concise)
It seems this is an "old" issue, but I ran into it and am not able to fix it with the comments I found in the existing issues.
I have 2 express apps, all running in a (single) docker container. The first app serves as a gateway, which should proxy incoming requests to the target server.
GET requests are proxied correctly. POST requests seem to loose their body.
Step-by-step reproduction instructions
Expected behavior (be clear and concise)
The target server should receive the POST request with the original body
How is http-proxy-middleware used in your project?
What http-proxy-middleware configuration are you using?
What OS/version and node/version are you seeing the problem?
Additional context (optional)
No response