Skip to content

Commit

Permalink
fix regression in REVERSE_PROXY to allow comma seperated integers (CT…
Browse files Browse the repository at this point in the history
…Fd#1999)

Co-authored-by: Kevin Chung <[email protected]>

* Fix issue with REVERSE_PROXY comma separated string configuration
* Closes CTFd#1993
  • Loading branch information
lecafard authored Oct 11, 2021
1 parent 3e6f635 commit 78b324e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CTFd/config.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import configparser
import os
from distutils.util import strtobool
from typing import Union


class EnvInterpolation(configparser.BasicInterpolation):
Expand Down Expand Up @@ -174,7 +175,7 @@ class ServerConfig(object):
AWS_S3_ENDPOINT_URL: str = empty_str_cast(config_ini["uploads"]["AWS_S3_ENDPOINT_URL"])

# === OPTIONAL ===
REVERSE_PROXY: bool = process_boolean_str(empty_str_cast(config_ini["optional"]["REVERSE_PROXY"], default=False))
REVERSE_PROXY: Union[str, bool] = empty_str_cast(config_ini["optional"]["REVERSE_PROXY"], default=False)

TEMPLATES_AUTO_RELOAD: bool = process_boolean_str(empty_str_cast(config_ini["optional"]["TEMPLATES_AUTO_RELOAD"], default=True))

Expand Down

0 comments on commit 78b324e

Please sign in to comment.