On Feb 18, 2:14 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Does anyone have suggestions on how to make request.is_secure() work > from behind a reverse proxy? I have nginx proxying to apache but since > nginx (and not apache) is handling SSL the HTTPS environment variable > that is_secure() reads from never gets set. > > This is easily solvable for standard redirects from http to https for > certain paths. I can do this by putting them in nginx.conf. However, I > want to have media served over SSL depending on whether the incoming > request is SSL, I have some middleware to do this, but it relies on > is_secure(). Any suggestions?
Does nginx have an equivalent to Apache mod_headers? In Apache this might have been able to be used to set a special magic header which is picked up by a back end and translated back into a variable setting such as HTTPS. Graham --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---