Start by renaming variables to something more generic. This will give us a bit more flexibility as we look to other session management mechanisms.

This commit is contained in:
Tim Farrell
2024-02-01 13:40:59 -06:00
parent b2fae0643e
commit d67f3d982b
4 changed files with 11 additions and 7 deletions

View File

@@ -98,12 +98,15 @@ WEBUI_VERSION = os.environ.get("WEBUI_VERSION", "v1.0.0-alpha.61")
WEBUI_AUTH = True
####################################
# WEBUI_JWT_SECRET_KEY
# WEBUI_SECRET_KEY
####################################
WEBUI_JWT_SECRET_KEY = os.environ.get("WEBUI_JWT_SECRET_KEY", "t0p-s3cr3t")
WEBUI_SECRET_KEY = os.environ.get(
"WEBUI_SECRET_KEY",
os.environ.get("WEBUI_JWT_SECRET_KEY", "t0p-s3cr3t") # DEPRECATED: remove at next major version
)
if WEBUI_AUTH and WEBUI_JWT_SECRET_KEY == "":
if WEBUI_AUTH and WEBUI_SECRET_KEY == "":
raise ValueError(ERROR_MESSAGES.ENV_VAR_NOT_FOUND)
####################################