The same url works with curl, but not with http-proxy-middleware. The Express is running in Heroku. CURL in my local mac (also tested with an Android app). Based on the target logs in AWS CloudWatch logs for the lambda function, the proxied request never reaches the destination.
curl -X POST https://mytarget.com/api/v1/a/b
Feb 6 23:57:11 [HPM] Router new target: https://mytarget.com -> "https://mytarget.com"
Feb 6 23:57:11 [HPM] POST /api/v1/a/b -> https://mytarget.com
Feb 6 23:57:38 [ERROR] <SB691916D483> HTTP failed: Response timeout
Feb 6 23:57:38 [ERROR] <SB691916D483> Stack: ServiceUnavailableError: Response timeout
Feb 6 23:57:38 at IncomingMessage.<anonymous> (/app/node_modules/connect-timeout/index.js:84:8)
Feb 6 23:57:38 at IncomingMessage.emit (node:events:513:28)
Feb 6 23:57:38 at Timeout._onTimeout (/app/node_modules/connect-timeout/index.js:49:11)
Feb 6 23:57:38 at listOnTimeout (node:internal/timers:559:17)
Feb 6 23:57:38 at processTimers (node:internal/timers:502:7)
Step-by-step reproduction instructions
1. Call the api
2. Timeout
Expected behavior (be clear and concise)
No timeout
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 "dependencies".
info Disk size without dependencies: "184KB"
info Disk size with unique dependencies: "596KB"
info Disk size with transitive dependencies: "4.66MB"
info Number of shared dependencies: 10
What http-proxy-middleware configuration are you using?
Not clear from your example...
I suspect you are also using the body-parser middleware.
If so, try to configure body-parser after http-proxy-middleware
Checks
http-proxy-middleware
.Describe the bug (be clear and concise)
The same url works with curl, but not with http-proxy-middleware. The Express is running in Heroku. CURL in my local mac (also tested with an Android app). Based on the target logs in AWS CloudWatch logs for the lambda function, the proxied request never reaches the destination.
curl -X POST https://mytarget.com/api/v1/a/b
Step-by-step reproduction instructions
Expected behavior (be clear and concise)
No timeout
How is http-proxy-middleware used in your project?
What http-proxy-middleware configuration are you using?
Additional context (optional)
No response