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

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