Commit 18a817e4 authored by Romain Courteaud's avatar Romain Courteaud Committed by Vincent Pelletier

http: Populate HTTPS environment variable.

So "wsgi.url_scheme" gets the correct value.
parent dd7ed29e
...@@ -79,6 +79,7 @@ class CaucaseSSLWSGIRequestHandler(CaucaseWSGIRequestHandler): ...@@ -79,6 +79,7 @@ class CaucaseSSLWSGIRequestHandler(CaucaseWSGIRequestHandler):
ssl_client_cert_serial = '-' ssl_client_cert_serial = '-'
def get_environ(self): def get_environ(self):
environ = CaucaseWSGIRequestHandler.get_environ(self) environ = CaucaseWSGIRequestHandler.get_environ(self)
environ['HTTPS'] = 'on'
client_cert_der = self.request.getpeercert(binary_form=True) client_cert_der = self.request.getpeercert(binary_form=True)
if client_cert_der is not None: if client_cert_der is not None:
cert = x509.load_der_x509_certificate( cert = x509.load_der_x509_certificate(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment