Development

#637 ([PATCH] Absolute URLs and Reverse Proxy)

You must first sign up to be able to contribute.

Ticket #637 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

[PATCH] Absolute URLs and Reverse Proxy

Reported by: juan.cataldo@gmail.com Assigned to: pookey
Priority: minor Milestone: 0.6.3
Component: Version: 0.6.2
Keywords: reverse proxy, request, getHost Cc:
Qualification:

Description

Symfony link helpers have no support for the generation of absolute URLs behind a reverse proxy.

Currently the getHost() method of the sfWebRequest class uses only the HTTP_HOST header, which is useless behind a reverse proxy, because it contains the private IP address of the server.

My patch fixes the problem forcing getHost() to check the HTTP_X_FORWARDED_HOST header before considering HTTP_HOST.

Attachments

reverse-proxy.patch (0.5 kB) - added by pookey on 06/17/06 23:01:09.

Change History

06/17/06 23:01:09 changed by pookey

  • attachment reverse-proxy.patch added.

06/17/06 23:02:30 changed by pookey

  • owner set to pookey.
  • status changed from new to assigned.

I'm accepting this ticket - before merging I want to make sure this isn't just an apacheism, and if it is, then I'll try to make this compatable with other reverse proxy setups that use something other then apache.

06/21/06 11:19:21 changed by fabien

  • status changed from assigned to closed.
  • resolution set to fixed.
  • milestone set to 0.6.3.

in r1496