* Fix behavior for `REVERSE_PROXY` setting when set to a boolean instead of a string
This commit is contained in:
Zander Work
2020-02-29 20:37:57 -08:00
committed by GitHub
parent 65a640184b
commit 2f106d4fc3
2 changed files with 13 additions and 1 deletions

View File

@@ -32,6 +32,18 @@ def test_reverse_proxy_config():
assert app.wsgi_app.x_prefix == 1
destroy_ctfd(app)
class ReverseProxyConfig(TestingConfig):
REVERSE_PROXY = True
app = create_ctfd(config=ReverseProxyConfig)
with app.app_context():
assert app.wsgi_app.x_for == 1
assert app.wsgi_app.x_proto == 1
assert app.wsgi_app.x_host == 1
assert app.wsgi_app.x_port == 1
assert app.wsgi_app.x_prefix == 1
destroy_ctfd(app)
def test_server_sent_events_config():
"""Test that SERVER_SENT_EVENTS configuration behaves properly"""