mirror of
https://github.com/Novartis/cellxgene-gateway.git
synced 2026-10-09 06:58:12 +08:00
only set wsgi.url_scheme when EXTERNAL_PROTOCOL is set
This commit is contained in:
+9
-1
@@ -1,6 +1,14 @@
|
|||||||
|
# 0.3.0
|
||||||
|
|
||||||
|
* Added support for itemsource interface, allowing s3 hosting
|
||||||
|
* Removed support for http file uploads
|
||||||
|
* Only set wsgi.url_scheme when EXTERNAL_PROTOCOL is set (see issue #43)
|
||||||
|
* Dropped flake8 due to conflicts with black
|
||||||
|
* Added code coverage metrics
|
||||||
|
|
||||||
# 0.2.3
|
# 0.2.3
|
||||||
|
|
||||||
* Added support for ProxyFix
|
* Added support for ProxyFix
|
||||||
|
|
||||||
# 0.2.2
|
# 0.2.2
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ external_host = os.environ.get(
|
|||||||
os.environ.get("GATEWAY_HOST", f"localhost:{gateway_port}"),
|
os.environ.get("GATEWAY_HOST", f"localhost:{gateway_port}"),
|
||||||
)
|
)
|
||||||
external_protocol = os.environ.get(
|
external_protocol = os.environ.get(
|
||||||
"EXTERNAL_PROTOCOL", os.environ.get("GATEWAY_PROTOCOL", "http")
|
"EXTERNAL_PROTOCOL", os.environ.get("GATEWAY_PROTOCOL", None)
|
||||||
)
|
)
|
||||||
ip = os.environ.get("GATEWAY_IP")
|
ip = os.environ.get("GATEWAY_IP")
|
||||||
extra_scripts = os.environ.get("GATEWAY_EXTRA_SCRIPTS")
|
extra_scripts = os.environ.get("GATEWAY_EXTRA_SCRIPTS")
|
||||||
|
|||||||
@@ -46,7 +46,8 @@ default_item_source = None
|
|||||||
|
|
||||||
def _force_https(app):
|
def _force_https(app):
|
||||||
def wrapper(environ, start_response):
|
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 app(environ, start_response)
|
||||||
|
|
||||||
return wrapper
|
return wrapper
|
||||||
|
|||||||
Reference in New Issue
Block a user