fix(demo): exempt landing routes from COEP so the Cal.com booker loads on soft nav - #6110
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryMedium Risk Overview Adds a Reviewed by Cursor Bugbot for commit d98230c. Bugbot is set up for automated code reviews on this repo. Configure here. |
Greptile SummaryUpdates Next.js response-header routing so all current marketing routes omit COEP during client-side navigation while preserving strict COEP on application routes and leaving existing COOP behavior unchanged. Confidence Score: 5/5The PR appears safe to merge with the current route inventory. Every existing landing route is covered by the COEP exemption, current non-landing routes remain isolated, and the overlapping permissive header rule does not conflict with the new matcher.
|
| Filename | Overview |
|---|---|
| apps/sim/next.config.ts | Adds a complete landing-route inventory and separates COEP from COOP matching; all current landing and non-landing routes receive the intended policies without conflicting header rules. |
Reviews (1): Last reviewed commit: "fix(demo): exempt landing routes from CO..." | Re-trigger Greptile
Summary
/demo's Cal.com booker hung on an infinite spinner when reached by clicking "Request a demo" from any landing page — it only worked on a direct load or refresh<Link>navigations, so/demo's existingunsafe-noneexemption (fix(demo): unblock Cal.com booking embed and align work-email validation #5335) never applied on a soft nav; the booker iframe loadedcredentiallessand stalled on its storage-access handshakeLANDING_ROUTESlist, which exempts the marketing surface (app/(landing)/**) wholesale since every landing page can soft-nav into/demosame-origin,/demokeepssame-origin-allow-popupsType of Change
Testing
Tested manually. Reproduced on prod: from
/?home, clicking "Request a demo" leavescrossOriginIsolated: trueon/demo(navigation entry still/?home), and<cal-inline>never reachesloading="done"— iframe stuck atheight: 100%.Verified on the patched build:
/and/pricingserve no COEP (browser defaultunsafe-none),/demounsafe-none,/loginstillcredentialless; COOP unchanged on all four. Same soft-nav path now givescrossOriginIsolated: falseand the embed reachesloading="done"with the iframe resolving to 592px — calendar renders and slots are selectable.Route patterns validated against Next's bundled
path-to-regexp: all 23 landing paths exempt, all 15 isolated routes still strict, no path receiving two conflicting values for either header.LANDING_ROUTESverified at exact parity with theapp/(landing)directory listing.bun run lintclean; all 11 audit checks pass (check:boundaries,check:api-validation:strict,check:utils,check:zustand-v5,check:react-query,check:client-boundary,check:bare-icons,check:icon-paths,check:realtime-prune,skills:check,agent-stream-docs:check). No migrations touched.Checklist