Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Disable websocket support in uvicorn (#11785)

Mikaa2aa0cf23c36
diff --git a/CHANGELOG.md b/CHANGELOG.md
index b77c301866..076b848ad0 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -16,6 +16,7 @@ All notable, unreleased changes to this project will be documented in this file.
### Other changes
- Allow `webhookCreate` and `webhookUpdate` mutations to inherit events from `query` field - #11736 by @zedzior
- Add new `PRODUCT_VARIANT_STOCK_UPDATED` event - #11665 by @jakubkuc
+- Disable websocket support by default in uvicorn worker configuration - #11785 by @NyanKiyoshi
# 3.10.0 [Unreleased]
diff --git a/saleor/asgi/gunicorn_worker.py b/saleor/asgi/gunicorn_worker.py
index 9a65b6f69a..17e579f5dc 100644
--- a/saleor/asgi/gunicorn_worker.py
+++ b/saleor/asgi/gunicorn_worker.py
@@ -2,6 +2,10 @@ from uvicorn.workers import UvicornWorker as BaseUvicornWorker
class UvicornWorker(BaseUvicornWorker):
- # Override default config args, that cannot be passed as gunicorn parameters,
- # to disable lifespan, not supported by django
- CONFIG_KWARGS = {"loop": "uvloop", "http": "httptools", "lifespan": "off"}
+ # Override default config args, that cannot be passed as gunicorn parameters.
+ CONFIG_KWARGS = {
+ "loop": "uvloop",
+ "http": "httptools",
+ "lifespan": "off",
+ "ws": "none",
+ }