Opened 17 years ago

Last modified 14 years ago

#6548 closed

django behind apache ssl proxy — at Version 2

Reported by: laureline.guerin@… Owned by: nobody
Component: HTTP handling Version: dev
Severity: Keywords:
Cc: anball@… Triage Stage: Design decision needed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Ramiro Morales)

I've seen some code in http/__init__.py:get_host function to handle X-FORWARDED-HOST that could be added by an apache proxy.

Unfortunately, there is no way to determine if proxy is acceded in https or http, so an issue occures when django wants to build an url for some Redirect : the url is built using the X-FORWARDED-HOST, but always assume that the proxy is non-SSL.

I think there could be some solutions to solve this issue :

  • Remove test for X-FORWARDED-HOST in get_host, apache mod_proxy is designed to rewrite Location headers (used in redirect)
  • If some people want to have X-FORWARDED-HOST handled in get_host, then add a setting to enable or disable it
  • add a setting like 'HTTPS_PROXY=on' that would work like HTTPS=ON

Change History (2)

comment:1 by Simon Greenhill <dev@…>, 17 years ago

Triage Stage: UnreviewedDesign decision needed

Can you raise this on the django-developers mailing list?

comment:2 by Ramiro Morales, 16 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.
Back to Top