From fa8efb178efb9e99bc1a34519b79ec22e87bc45b Mon Sep 17 00:00:00 2001 From: meeb Date: Fri, 24 Mar 2023 13:02:16 +1100 Subject: [PATCH] allow easy container env var override of HEALTHCHECK_ALLOWED_IPS, resolves #168 --- tubesync/tubesync/local_settings.py.container | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tubesync/tubesync/local_settings.py.container b/tubesync/tubesync/local_settings.py.container index b86d04d..a7a07ab 100644 --- a/tubesync/tubesync/local_settings.py.container +++ b/tubesync/tubesync/local_settings.py.container @@ -67,6 +67,12 @@ YOUTUBE_DL_CACHEDIR = CONFIG_BASE_DIR / 'cache' COOKIES_FILE = CONFIG_BASE_DIR / 'cookies.txt' +HEALTHCHECK_FIREWALL_STR = str(os.getenv('TUBESYNC_HEALTHCHECK_FIREWAL', 'True')).strip().lower() +HEALTHCHECK_FIREWALL = True if HEALTHCHECK_FIREWALL_STR == 'true' else False +HEALTHCHECK_ALLOWED_IPS_STR = str(os.getenv('TUBESYNC_HEALTHCHECK_ALLOWED_IPS', '127.0.0.1')) +HEALTHCHECK_ALLOWED_IPS = HEALTHCHECK_ALLOWED_IPS_STR.split(',') + + BASICAUTH_USERNAME = os.getenv('HTTP_USER', '').strip() BASICAUTH_PASSWORD = os.getenv('HTTP_PASS', '').strip() if BASICAUTH_USERNAME and BASICAUTH_PASSWORD: