fix: make CORS reconciliation recoverable
Test / contract (pull_request) Successful in 6s

This commit is contained in:
Evelyn Chen
2026-08-29 23:48:39 +00:00
parent 310ae6a29d
commit 5f4325706b
4 changed files with 131 additions and 23 deletions
+4
View File
@@ -139,6 +139,10 @@ def _cors_origins(value, label):
f"{label} must contain '*' or canonical HTTPS origins"
) from None
else:
if getattr(address, "scope_id", None) is not None:
raise ConfigError(
f"{label} must contain '*' or canonical HTTPS origins"
)
hostname = f"[{address.compressed}]" if address.version == 6 else address.compressed
canonical.append(f"https://{hostname}{f':{port}' if port not in (None, 443) else ''}")
if len(canonical) != len(set(canonical)):