[Bug 61234] New: Add X-Forwarded-Proto to backend requests

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug 61234] New: Add X-Forwarded-Proto to backend requests

Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=61234

            Bug ID: 61234
           Summary: Add X-Forwarded-Proto to backend requests
           Product: Apache httpd-2
           Version: 2.5-HEAD
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_proxy
          Assignee: [hidden email]
          Reporter: [hidden email]
  Target Milestone: ---

Created attachment 35088
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=35088&action=edit
Add X-Forwarded-Proto

In order for backends behind a reverse proxy to reconstruct the original URL
requested by the client, mod_proxy needs to pass along not only the Host header
(in X-Forwarded-Host) but also the scheme.

With more and more websites adopting https, this is becoming increasingly
important.

The de-facto standard header for this purpose is X-Forwarded-Proto. Other
variants exist, but this seems to be the predominant name.

The header can be added manually with RequestHeader, but I think it should be
added automatically together with the other X-Forwarded-* headers when enabled.

The attached patch adds this feature. I am completely new to Apache httpd
development, so please help me get it right.

An alternative to adding support for X-Forwarded-Proto is to support the
Forwarded header specified in RFC 7239 (bug #58001). However, I believe both
solutions can coexist.

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 61234] Add X-Forwarded-Proto to backend requests

Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=61234

--- Comment #1 from [hidden email] ---
Nice patch. We would like to have this feature as well.
A current workaround could look like:

RequestHeader set "X-Forwarded-Proto" expr=%{REQUEST_SCHEME}
RequestHeader set "X-Forwarded-SSL" expr=%{HTTPS}

Even better would be to support the Forwarded header
(https://tools.ietf.org/html/rfc7239).

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 61234] Add X-Forwarded-Proto to backend requests

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=61234

--- Comment #2 from [hidden email] ---
See also: https://bz.apache.org/bugzilla/show_bug.cgi?id=58001

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 61234] Add X-Forwarded-Proto to backend requests

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=61234

Christian Schmidt <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |PatchAvailable

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 61234] Add X-Forwarded-Proto to backend requests

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=61234

Michael Osipov <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--- Comment #3 from Michael Osipov <[hidden email]> ---
I'd like to see this too, it is just another wasted line in the httpd.conf.

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 61234] Add X-Forwarded-Proto to backend requests

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=61234

Michael Osipov <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--- Comment #4 from Michael Osipov <[hidden email]> ---
Can some committer take a look at it? This change is trivial.

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]