Skip to content

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

Add x-source header to cors handler

andrzejewsky9c482339ca78
diff --git a/saleor/asgi/cors_handler.py b/saleor/asgi/cors_handler.py
index 571cf5e55c..d27e131e04 100644
--- a/saleor/asgi/cors_handler.py
+++ b/saleor/asgi/cors_handler.py
@@ -40,7 +40,7 @@ def cors_handler(application: ASGI3Application) -> ASGI3Application:
(b"access-control-allow-credentials", b"true"),
(
b"access-control-allow-headers",
- b"Origin, Content-Type, Accept, Authorization, "
+ b"Origin, Content-Type, Accept, Authorization, X-Source"
b"Authorization-Bearer",
),
(b"access-control-allow-methods", b"POST, OPTIONS"),
diff --git a/saleor/asgi/tests/test_cors.py b/saleor/asgi/tests/test_cors.py
index 1993da076d..36a0c0a1ab 100644
--- a/saleor/asgi/tests/test_cors.py
+++ b/saleor/asgi/tests/test_cors.py
@@ -61,7 +61,7 @@ async def test_access_control_header_preflight(asgi_app: ASGI3Application, setti
(b"access-control-allow-credentials", b"true"),
(
b"access-control-allow-headers",
- b"Origin, Content-Type, Accept, Authorization, "
+ b"Origin, Content-Type, Accept, Authorization, X-Source"
b"Authorization-Bearer",
),
(b"access-control-allow-methods", b"POST, OPTIONS"),