only set wsgi.url_scheme when EXTERNAL_PROTOCOL is set

This commit is contained in:
Alok Saldanha
2021-04-05 07:55:20 -04:00
parent ad3517f002
commit ae35d24d80
3 changed files with 12 additions and 3 deletions
+2 -1
View File
@@ -46,7 +46,8 @@ default_item_source = None
def _force_https(app):
def wrapper(environ, start_response):
environ["wsgi.url_scheme"] = env.external_protocol
if env.external_protocol is not None:
environ["wsgi.url_scheme"] = env.external_protocol
return app(environ, start_response)
return wrapper