Skip to content
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

accessing proxy headers in userResHeaderDecorator #381

Open
mg opened this issue Oct 2, 2018 · 1 comment
Open

accessing proxy headers in userResHeaderDecorator #381

mg opened this issue Oct 2, 2018 · 1 comment
Assignees
Labels

Comments

@mg
Copy link

mg commented Oct 2, 2018

Hi,

userResHeaderDecorator is confusing me. Im trying to access a header value that was set in proxyReqOptDecorator before sending the request but I do not understand how to access it.

In userResHeaderDecorator(headers, userReq, userRes, proxyReq, proxyRes), proxyReq is ALWAYS an empty object ( console.log outputs {}) but if I console log proxyRes I can see the value I want, but it is burried in proxyRes.req._header.

How should I access my header value, what would be the correct way?

cheers,
mg

@monkpow
Copy link
Collaborator

monkpow commented Oct 19, 2018

Hi @mg,

It makes sense this is confusing; the documentation is very sparse! I will update the docs and clarify the issue you've raised about proxyReq being empty.

Thanks for raising this issue.

@monkpow monkpow self-assigned this Oct 19, 2018
@monkpow monkpow added the next label Oct 19, 2018
monkpow added a commit that referenced this issue Oct 24, 2018
* [#381] Fixes proxyReq is empty ({}) in userResHeaderDecorator.

* Remove old comment.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants