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

This commit is contained in:
Jun Siang Cheah committed 2024-09-08 12:00:36 +01:00
1 parent 1a6ce1d5d9
commit 698976add0
2 files changed
+15 -1

No files matched your search

+6
View File
@@ -810,6 +810,12 @@ ENABLE_MESSAGE_RATING = PersistentConfig(
os.environ.get("ENABLE_MESSAGE_RATING", "True").lower() == "true",
)
ENABLE_WEBSOCKET_SUPPORT = PersistentConfig(
"ENABLE_WEBSOCKET_SUPPORT",
"ui.enable_websocket_support",
os.environ.get("ENABLE_WEBSOCKET_SUPPORT", "True").lower() == "true",
)
def validate_cors_origins(origins):
for origin in origins: