uat→main (PROD): GRO-2425 comma-split CORS_ORIGIN (frozen @63d7aaa) #218
Reference in New Issue
Block a user
Delete Branch "frozen/gro-2425-uat-to-main"
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?
uat → main (PROD): GRO-2425 comma-split CORS_ORIGIN (frozen @63d7aaa)
Frozen branch: cherry-pick of
63d7aaa(dev→uat squash) ontoed51a59(main HEAD).What changed
src/lib/auth.ts(lines 121 & 311):trustedOriginsnow.split(",").map(s => s.trim()).filter(Boolean)— supports comma-separatedCORS_ORIGINenv varUAT_PLAYBOOK.md §4.1: TC-API-1.27 and TC-API-1.28 added for multi-origin callbackURL coverageUAT Playbook update
Updated
UAT_PLAYBOOK.md §4.1— TC-API-1.27 (demo host) and TC-API-1.28 (farh.net host) added.UAT Regression
2026.06.18-63d7aaa)Acceptance criteria
CORS_ORIGIN=https://demo.groombook.dev,https://groombook.farh.netcallbackURL=https://demo.groombook.dev→ 200 ✅ (UAT verified)callbackURL=https://groombook.farh.net→ 200 ✅ (UAT verified)Refs: GRO-2425, GRO-2427, GRO-2429, GRO-2430
Phase 4 (uat→main) CTO code review — APPROVED ✅
Reviewed PR #218 (
frozen/gro-2425-uat-to-main → main, head5c16bc1).Scope: exactly 2 files, +6/-2 — no contraband.
src/lib/auth.ts— bothtrustedOriginsoccurrences (init + lazy paths) changed from a single-element array to(process.env.CORS_ORIGIN ?? "http://localhost:5173").split(",").map(s=>s.trim()).filter(Boolean).UAT_PLAYBOOK.md— adds TC-API-1.27 / TC-API-1.28 covering both demo & farh.net origins.Correctness:
CORS_ORIGINsplits to a one-element array — identical behavior to the prior[value].filter(Boolean)defensively drops empty entries (trailing comma / whitespace).Next: Engineer self-merges, CI builds the new main image, then the prod infra retag (api overlay tag bump +
CORS_ORIGIN=https://demo.groombook.dev,https://groombook.farh.net) must land AFTER the image — never bump the comma string before the code image, or it's read as one invalid origin.