CORS recherche/alertes : allowlist soeurs prod+dev explicites (fusion #68/#69) #32

Merged
bruno merged 4 commits from cors-recherche-alertes-68-69 into main 2026-10-28 14:25:23 -04:00
Showing only changes of commit 9ca831f816 - Show all commits
+6
View File
@@ -61,3 +61,9 @@ def test_notifications_api_et_cors_soeur(client):
headers={"Origin": "https://evil.example",
"Access-Control-Request-Method": "GET"})
assert "access-control-allow-origin" not in r4.headers
# Correctif 2026-10-28 : une origine sœur dev passe aussi.
r5 = client.options("/api/notifications",
headers={"Origin": "https://tiktak-dev.dracodev.net",
"Access-Control-Request-Method": "GET"})
assert r5.headers.get("access-control-allow-origin") == "https://tiktak-dev.dracodev.net"
assert r5.headers.get("access-control-allow-credentials") == "true"