Skip to content

Added client's req object to proxyRes event #635

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

Closed
wants to merge 1 commit into from
Closed

Added client's req object to proxyRes event #635

wants to merge 1 commit into from

Conversation

Domiii
Copy link
Contributor

@Domiii Domiii commented May 1, 2014

The req object gives listeners of the proxyRes event access to the original client request, and thus allows accessing the session and identifying the user for whom we are doing the routing operation. Added the req object as second parameter, so it won't break existing code.

The req object gives listeners of the proxyRes event access to the original client request, and thus allows accessing the session and identifying the user for whom we are doing the routing operation. Added the req object as second parameter, so it won't break existing code.
@bruce-one
Copy link
Contributor

I'd also find it very useful to have access to the req object in this situation :-)

@bruce-one
Copy link
Contributor

Actually, further to this, it would be great to have access to the res object as well.
It used to be accessible as part of the 'proxyResponse' event (I'm not sure how long ago that was exactly - but I'm trying to update some code to the newer http-proxy) and hence am no longer able to access proxy responses as conveniently as previously.

@jcrugzz
Copy link
Contributor

jcrugzz commented May 11, 2014

@bruce-one id take an updated PR on this :)

@bruce-one
Copy link
Contributor

I created a new pull request - #642 - as I wasn't sure about updating other people's pull requests :-s

@jcrugzz
Copy link
Contributor

jcrugzz commented May 11, 2014

fixed in #642

@jcrugzz jcrugzz closed this May 11, 2014
@Domiii Domiii deleted the patch-2 branch May 20, 2014 05:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants