stable · guide · 0.1.0
Manage Project Client Browser Origins
Project Client Browser Origin 是一個 Project Client 與 Platform Environment-scoped 的 exact origin,格式只有 scheme://host[:port]。它不是 OIDC redirect URI;不含 callback path、query、fragment 或 credentials。
Platform Operator 透過 versioned administration operations browser-origins.register、browser-origins.list 與 browser-origins.revoke 管理 allowlist。這些 operations 需要 clients responsibility、相符 Project Client scope 與 environment,以及最近十分鐘內的 passkey 或 recovery-code authentication;成功、拒絕與衝突都沿用 administration audit seam。Project Credential 無法呼叫這些 operations。
Production 只接受 normalized HTTPS。Sandbox 接受 HTTPS,並僅為 local acceptance 接受 http://localhost[:port] 與 http://127.0.0.1[:port]。Scheme 與 hostname canonicalize 為 lowercase,HTTPS 443 與 HTTP 80 default port 會移除;相同 normalized origin 的重複註冊為 idempotent。Wildcard、hostname suffix、null、非 HTTP(S) scheme 與跨 Project Client access 都不成立。
每次註冊或撤銷都在 database transaction commit 後同步同一份 canonical allowlist 的 gateway runtime projection;發出 fresh Realtime Grant 時也會從 PostgreSQL 重建該 Project Client 的 projection,以便 Redis restart 後恢復。Preflight 與 authenticated response 都以 Project Client ID 與 exact origin 查詢它。Preflight 只允許 /sse 的 GET、/publish 的 POST,以及完整 header set Authorization, Content-Type, X-Correlation-ID, and optional traceparent;未知、缺少或 null Origin 不取得 browser CORS access。