feat: add ENABLE_WEBSOCKET_SUPPORT to force socket.io to ignore websocket upgrades

This commit is contained in:
Jun Siang Cheah
2024-09-09 23:17:17 +01:00
parent 698976add0
commit 827c419251
3 changed files with 8 additions and 11 deletions
+4
View File
@@ -273,3 +273,7 @@ WEBUI_SESSION_COOKIE_SECURE = os.environ.get(
if WEBUI_AUTH and WEBUI_SECRET_KEY == "":
raise ValueError(ERROR_MESSAGES.ENV_VAR_NOT_FOUND)
ENABLE_WEBSOCKET_SUPPORT = (
os.environ.get("ENABLE_WEBSOCKET_SUPPORT", "True").lower() == "true"
)