fix(api): serve certificate chain with CORS headers #109
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/certificate-chain-cors"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The v2.6 browser/WASM client fetches
/sdk/certificate-chaincross-origin before keyless registration. Upstream (utils.HandleAPICORS) sets CORS headers on every API path; the Rust relay returned this success response withoutAccess-Control-Allow-Origin, so browsers blocked it (blocked by CORS policy) and the WASM client retried forever without registering. Found by the public live gate forv2.6.0+rs.1-dev.2and reproduced against the exact published image in an isolated loopback container.Change
Wrap the certificate-chain success reply in
with_cors, matching every other API reply.Validation
certificate_chain_returns_only_current_listener_public_certsto assert the CORS header; it failed before the fix and passes after.cargo fmt --checkclean.Risk
None beyond adding a CORS header to a public, read-only certificate response.