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

Header Rewriting #96

Closed
darylrobbins opened this issue Feb 2, 2015 · 4 comments
Closed

Header Rewriting #96

darylrobbins opened this issue Feb 2, 2015 · 4 comments
Milestone

Comments

@darylrobbins
Copy link
Contributor

The admin web ui mentions "Modify the incoming request's URL or headers before passing it to the backend." under Advanced Requests Rewriting, but there does not seem to be any way to rewrite headers. Essentially what I am trying to accomplish is to let my backend know whether the original request was via http or https. My AWS Elastic Load Balancer (ELB) conveniently adds a x-forwarded-proto header to let me know but this information gets lost when the request travels through the second ELB for the backend service since all traffic is send via http.

@darylrobbins
Copy link
Contributor Author

Please see: NREL/api-umbrella-gatekeeper#7

@GUI
Copy link
Member

GUI commented Feb 3, 2015

Just to double check I understand this correctly, this is primarily to rename an existing header to another field, since the second ELB wipes out the original header? Because API Umbrella should pass along the original X-Forwarded-Proto header as-is, but it sounds like the second ELB backend is then overwriting that original value, is that correct? Ideally, you could setup the ELB to trust these forwarded headers from certain sources, but since I don't think that's possible, I can definitely see how renaming this to an alternative field would be useful.

And thanks for the PR! I just have a couple comments I'll leave over there.

@darylrobbins
Copy link
Contributor Author

Yes, your understanding is correct. Unfortunately, there is no way to trust header values in an ELB, so you are correct they need to be saved with a different name. We will have one ELB in front of our API umbrella nodes and then one internal ELB in front of the backend nodes. This allows AWS to do auto healing and simplifies scaling significantly.

@GUI GUI added this to the v0.7 milestone Feb 3, 2015
@GUI GUI added the enhancement label Feb 3, 2015
@GUI
Copy link
Member

GUI commented Feb 10, 2015

This has been released as part of the new v0.7 packages. Thanks for implementing this new feature!

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

No branches or pull requests

2 participants