mirror of
https://github.com/aljazceru/CTFd.git
synced 2025-12-17 05:54:19 +01:00
* Fix behavior for `REVERSE_PROXY` setting when set to a boolean instead of a string
This commit is contained in:
@@ -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"""
|
||||
|
||||
Reference in New Issue
Block a user