We're running a production setup with nginx running in front of apaches running mod_python. Nginx is decoding all ssl and reverse proxying (the decrypted requests) to apache on the backend. We recently upgraded mod_python and are now running into an issue because of this django code...
def is_secure(self): try: return self._req.is_https() except AttributeError: # mod_python < 3.2.10 doesn't have req.is_https(). return self._req.subprocess_env.get('HTTPS', '').lower() in ('on', '1') Since our version of mod_python is now greater than 3.2.10 it calls is_https which returns that the request is unencryped (as that is what apache sees since nginx has decrypted the request. With the old version of mod_python I was setting a header in nginx which apache then read with a SetEnvIf directive and set the HTTPS variable appropriately. I'm looking for a similar solution to do so that self._req.is_https() in the above code returns true. Is there a way to do this without hacking up mod_python, or do I just have to patch django's is_secure method to act as if I were still running the old version of mod_python (and thus run self._req.subprocess_env.get('HTTPS', '').lower() in ('on', '1')). --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---