Skip to content

Better scheme detection based on RFC7239 #1310

Closed

Description

@ioquatix

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.

Activity

  1. jeremy commented on Nov 1, 2018

    @jeremy
    Member

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

  2. ioquatix commented on Nov 2, 2018

    @ioquatix
    MemberAuthor

    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.

  3. ioquatix commented on Feb 4, 2019

    @ioquatix
    MemberAuthor

    Related PR: #1224

  4. jeremyevans commented on Jan 22, 2020

    @jeremyevans
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions