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

Better scheme detection based on RFC7239 #1310

Closed
ioquatix opened this issue Oct 27, 2018 · 4 comments
Closed

Better scheme detection based on RFC7239 #1310

ioquatix opened this issue Oct 27, 2018 · 4 comments

Comments

@ioquatix
Copy link
Member

It seems like X-Forwarded-* is officially deprecated in favour of Forwarded: *= as defined in https://tools.ietf.org/html/rfc7239

I believe would be a good idea for Rack to support this.

There is at least one area where modifications are required: Request#scheme.

There may be others.

I am happy to submit a PR, but I thought we should discuss this first.

@jeremy
Copy link
Member

jeremy commented Nov 1, 2018

Positive on supporting Forwarded in preference to X-Forwarded-*, but without deprecation in Rack itself. RFC7239 has some notes on forward transition.

@ioquatix
Copy link
Member Author

ioquatix commented Nov 2, 2018

Yeah, in falcon I'm just setting both headers in my request proxy, and for the purpose of handling rack middleware I prefer X-Forwarded-For. I need to make a general purpose HTTP header parser which doesn't suck, so that I can extract the details from the Forwarded header in a more agnostic way.

@ioquatix
Copy link
Member Author

ioquatix commented Feb 4, 2019

Related PR: #1224

@jeremyevans
Copy link
Contributor

This isn't a bug in rack, but a feature request, so I'm going to close this now. Let's continue the discussion in #1423.

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 a pull request may close this issue.

3 participants