fix regression in REVERSE_PROXY to allow comma seperated integers (#1999)

Co-authored-by: Kevin Chung <kchung@ctfd.io>

* Fix issue with REVERSE_PROXY comma separated string configuration
* Closes #1993
This commit is contained in:
tom
2021-10-12 06:33:08 +11:00
committed by GitHub
parent 3e6f635b7b
commit 78b324e577

View File

@@ -1,6 +1,7 @@
import configparser
import os
from distutils.util import strtobool
from typing import Union
class EnvInterpolation(configparser.BasicInterpolation):
@@ -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))