-
Notifications
You must be signed in to change notification settings - Fork 878
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)
We have an express server where /health endpoint is present (GET method).
There is an external system which tries to call /health endpoint so that it can check the status and process further.
But whenever other system tries to call it, we see below error in our log
BadRequestError: request aborted
[HPM] Error occurred while proxying request <source_url> to <target_url>
[ECONNRESET] (https://nodejs.org/api/errors.html#errors_common_system_errors)
Step-by-step reproduction instructions
1. calling the /health endpoint from a different systemExpected behavior (be clear and concise)
We should be able to get 200 status HTTP code, whenever we /health endpoint is called.
How is http-proxy-middleware used in your project?
We have an express server created as below:
app.use('*', <middleware>, createProxyMiddleware({target, changeOrigin, onProxyReq: <function>, selfHandleResponse: true, onProxyRes: <function> })
Version -> http-proxy-middleware - ^2.0.0, I know this is not the latest version, but I tried that as well, it didn't solved the issue.What http-proxy-middleware configuration are you using?
createProxyMiddleware({
target,
changeOrigin,
onProxyReq: ****,
selfHandleResponse: true,
onProxyRes: ****,
})What OS/version and node/version are you seeing the problem?
Node Version -> v14.16.0-alpine3.13Additional context (optional)
No response
Metadata
Metadata
Assignees
Labels
No labels