#12043: Incorrect redirect to http instead of https
------------------------------------------+---------------------------------
Reporter: [email protected] | Owner: nobody
Status: new | Milestone:
Component: Core framework | Version: 1.1
Resolution: | Keywords: redirect http https
Stage: Unreviewed | Has_patch: 0
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 0 |
------------------------------------------+---------------------------------
Comment (by [email protected]):
It looks like you've got the right idea.
I am using Webfaction.
I haven't tried dumping out WSGI environment before it is passed into
Django, but I assume that your hypothesis is correct.
When I dump request.META (inside my Django view), I get:
- wsgi.url_scheme = http
- HTTP_X_FORWARDED_PROTO = https
So there are two possible solutions:
1. I get Webfaction to do as you suggest (to fix wsgi.url_scheme).
2. You change is_secure() to include HTTP_X_FORWARDED_PROTO in it's
calculation.
3. Do both.
Option 3 seems the most solid to me.
I'm sending Webfaction a link to this ticket.
--
Ticket URL: <http://code.djangoproject.com/ticket/12043#comment:2>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---