enh: lower JWT expiration default value and add warn message

This commit is contained in:
Classic298 authored and GitHub committed 2025-10-12 12:33:35 +02:00
1 parent ffad1f1dd1
commit 31f6520ba9
1 file changed
+7 -1
+7 -1
View File
@@ -307,7 +307,13 @@ API_KEY_ALLOWED_ENDPOINTS = PersistentConfig(
JWT_EXPIRES_IN = PersistentConfig( JWT_EXPIRES_IN = PersistentConfig(
"JWT_EXPIRES_IN", "auth.jwt_expiry", os.environ.get("JWT_EXPIRES_IN", "-1") "JWT_EXPIRES_IN", "auth.jwt_expiry", os.environ.get("JWT_EXPIRES_IN", "4w")
)
if JWT_EXPIRES_IN.value == "-1":
log.warning(
"⚠️ SECURITY WARNING: JWT_EXPIRES_IN is set to '-1'\n"
" See: https://docs.openwebui.com/getting-started/env-configuration\n"
) )
#################################### ####################################