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

ProxyHeaders uses X-Forwarded-Scheme, not X-Forwarded-Proto #79

Closed
jgraettinger opened this issue Jul 17, 2016 · 3 comments
Closed

ProxyHeaders uses X-Forwarded-Scheme, not X-Forwarded-Proto #79

jgraettinger opened this issue Jul 17, 2016 · 3 comments
Assignees
Labels

Comments

@jgraettinger
Copy link

RFC 7239 refers to X-Forwarded-Proto, as do the GoDocs of this package.

However, proxy_headers.go actually uses X-Forwarded-Scheme.

@elithrar
Copy link
Contributor

You're correct, and we should have been using that (although Scheme is incredibly popular as well). Given that users of this package are relying on X-Forwarded-Scheme, we either:

a) Update the docs and make no code changes (the bug lies in the docs)
b) Add a second header, leaving X-Forwarded-Scheme as-is.

I'd need to do some work to see how widely this package's X-Forwarded-Scheme is depended upon by applications (via GitHub/Sourcegraph search) before making any breaking change.

@elithrar elithrar added the bug label Jul 17, 2016
@elithrar elithrar self-assigned this Jul 17, 2016
@jgraettinger
Copy link
Author

I've actually never seen X-Forwarded-Scheme, though I'll take your word for it. Note that Heroku, AWS and Google Cloud Platform all use X-Forwarded-Proto (and not -Scheme) in their HTTP load balancing service. I think that effectively rules out "a". "b" sounds like the right move to me.

@elithrar
Copy link
Contributor

Correct, but Scheme still sees a lot of use (Scheme has more Google hits).
Would have been great to have this as Proto from the start, but that's
software.

You're welcome to submit a PR for option b) else I will fix it this week.
On Sun, Jul 17, 2016 at 1:49 PM Johnny Graettinger notifications@github.com
wrote:

I've actually never seen X-Forwarded-Scheme, though I'll take your word
for it. Note that Heroku
https://devcenter.heroku.com/articles/http-routing, AWS
http://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/x-forwarded-headers.html
and Google Cloud Platform
https://cloud.google.com/compute/docs/load-balancing/http/ all use
X-Forwarded-Proto (and not -Scheme) in their HTTP load balancing service.
I think that effectively rules out "a". "b" sounds like the right move to
me.


You are receiving this because you were assigned.

Reply to this email directly, view it on GitHub
#79 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AABIcDkNKt3onyoNVUe5EhEKBM53knpKks5qWpVtgaJpZM4JOSQj
.

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