From 8cfc62e9d045a63c81dd7a1079ccb552d9e18f2d Mon Sep 17 00:00:00 2001 From: Matt Scott Date: Thu, 13 Apr 2023 13:40:06 -0400 Subject: [PATCH] Corrected issue with `SERVER_EXTERNAL_SSL` setting not being extracted from the app's environment. --- configs/development.py | 2 +- configs/docker_config.py | 2 +- powerdnsadmin/default_config.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/configs/development.py b/configs/development.py index 3dbb17b..be6cf3b 100644 --- a/configs/development.py +++ b/configs/development.py @@ -7,7 +7,7 @@ SALT = '$2b$12$yLUMTIfl21FKJQpTkRQXCu' SECRET_KEY = 'e951e5a1f4b94151b360f47edf596dd2' BIND_ADDRESS = '0.0.0.0' PORT = 9191 -SERVER_EXTERNAL_SSL = None +SERVER_EXTERNAL_SSL = os.getenv('SERVER_EXTERNAL_SSL', None) ### DATABASE CONFIG SQLA_DB_USER = 'pda' diff --git a/configs/docker_config.py b/configs/docker_config.py index 4194aa9..ae2e275 100644 --- a/configs/docker_config.py +++ b/configs/docker_config.py @@ -6,7 +6,7 @@ import json # Defaults for Docker image BIND_ADDRESS = '0.0.0.0' PORT = 80 -SERVER_EXTERNAL_SSL = True +SERVER_EXTERNAL_SSL = os.getenv('SERVER_EXTERNAL_SSL', True) SQLALCHEMY_DATABASE_URI = 'sqlite:////data/powerdns-admin.db' SESSION_COOKIE_SAMESITE = 'Lax' CSRF_COOKIE_HTTPONLY = True diff --git a/powerdnsadmin/default_config.py b/powerdnsadmin/default_config.py index 723cb85..d9e2759 100644 --- a/powerdnsadmin/default_config.py +++ b/powerdnsadmin/default_config.py @@ -8,7 +8,7 @@ SECRET_KEY = 'e951e5a1f4b94151b360f47edf596dd2' BIND_ADDRESS = '0.0.0.0' PORT = 9191 HSTS_ENABLED = False -SERVER_EXTERNAL_SSL = True +SERVER_EXTERNAL_SSL = os.getenv('SERVER_EXTERNAL_SSL', True) SESSION_TYPE = 'sqlalchemy' SESSION_COOKIE_SAMESITE = 'Lax'