-
Notifications
You must be signed in to change notification settings - Fork 233
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FeatureReqeust: Pass the control back to the express server upon success #361
Comments
It does seem you can do this by changing Edit: My bad, it seems we are able to do this. @siva-vadivel , have a look at |
userResDecorator is executed right before sending the response to the user, however we would like to pass control bask to express after sending the response. One suggestion would be to call the express's next() method inside userResDecorator, but once next() is called, we would not be able to know when the response was completed (especially in the case of streaming responses) |
Ok, @siva-vadivel and @mx781, thanks for raising the issue, and the discussion. See commit above; I fixed the skipToNextHandler, and added the expressHttpProxy res and req to the user.res so you can read the proxy res and req values. |
When express-http-proxy is used as a middleware and we would like to know certain metrics such as timeTakenForResponse, we would need to be able to pass control back to the express server.
The text was updated successfully, but these errors were encountered: