Project

General

Profile

Feature #418

mod_proxy should send the X-Forwarded-Host header to the proxied server

Added by Anonymous almost 12 years ago. Updated 6 months ago.

Status:
Fixed
Priority:
Normal
Assignee:
-
Category:
mod_proxy
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
Missing in 1.5.x:

Description

Apache's mod_proxy adds a X-Forwarded-Host header when it makes a request to the proxied server; the header contains a copy of the original Host header, and allows the proxied server to see what its public address is.

Many web application frameworks, including Rails as I write this, look for this header in order to behave correctly.

It would be wonderful if lighttpd's mod_proxy could also send this header.

-- stephen_purcell

Associated revisions

Revision 41152667 (diff)
Added by gstrauss 6 months ago

[mod_proxy] set X-Forwarded-Host (fixes #418)

lighttpd appends the request "Host" to the non-standard header "X-Host"
when acting as a reverse proxy. This patch additionally appends "Host"
to the non-standard header "X-Forwarded-Host" to match the convention in
some other web servers

x-ref:
"mod_proxy should send the X-Forwarded-Host header to the proxied server"
https://redmine.lighttpd.net/issues/418

History

#1 Updated by Anonymous almost 12 years ago

That header is present already, but at the moment it is called "X-Host" in lighttpd.

-- conny

#2 Updated by gstrauss over 1 year ago

  • Tracker changed from Bug to Feature
  • Description updated (diff)

FYI: this should be implemented as the Forwarded HTTP Extension (https://tools.ietf.org/html/rfc7239)

#3 Updated by gstrauss 6 months ago

  • Status changed from New to Patch Pending
  • Assignee deleted (jan)
  • Target version set to 1.4.46

#4 Updated by gstrauss 6 months ago

  • Status changed from Patch Pending to Fixed
  • % Done changed from 0 to 100

Also available in: Atom