From 02db7ecaad8a5b2eee79b2c3319851341f6a9bd5 Mon Sep 17 00:00:00 2001 From: Greg McGuire Date: Fri, 4 Jan 2013 10:08:46 -0500 Subject: [PATCH] Set wsgi url_scheme to https if configured for SSL --- gunicorn/http/wsgi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gunicorn/http/wsgi.py b/gunicorn/http/wsgi.py index f57ad375..01ddd623 100644 --- a/gunicorn/http/wsgi.py +++ b/gunicorn/http/wsgi.py @@ -84,7 +84,7 @@ def create(req, sock, client, server, cfg): # may not qualify the remote addr: # http://www.ietf.org/rfc/rfc3875 forward = client or "127.0.0.1" - url_scheme = "http" + url_scheme = "https" if cfg.is_ssl else "http" script_name = os.environ.get("SCRIPT_NAME", "") secure_headers = cfg.secure_scheme_headers