* 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

@@ -177,7 +177,7 @@ def create_app(config="CTFd.config.Config"):
reverse_proxy = app.config.get("REVERSE_PROXY")
if reverse_proxy:
if "," in reverse_proxy:
if type(reverse_proxy) is str and "," in reverse_proxy:
proxyfix_args = [int(i) for i in reverse_proxy.split(",")]
app.wsgi_app = ProxyFix(app.wsgi_app, None, *proxyfix_args)
else: