mirror of
https://github.com/aljazceru/CTFd.git
synced 2025-12-17 22:14:25 +01:00
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:
@@ -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))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user