Skip to content

Commit ae92f4e

Browse files
committed
fix(landing): exclude /landing-preview from the landing CSP fallback
Greptile caught that /landing-preview calls notFound() in production (see app/landing-preview/page.tsx) and its subroutes (marks-lab, readme-tour-capture) don't render the (landing) layout either, so none of them ever load the HubSpot tracker — but the CSP fallback was still classifying the whole prefix as landing.
1 parent c9fa654 commit ae92f4e

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

apps/sim/proxy.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,8 @@ describe('isNonLandingPath', () => {
137137
'/invite/invite-id',
138138
'/playground',
139139
'/unsubscribe',
140+
'/landing-preview',
141+
'/landing-preview/marks-lab',
140142
]
141143
for (const path of paths) {
142144
expect(isNonLandingPath(path)).toBe(true)

apps/sim/proxy.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,9 @@ const NON_LANDING_PATH_PREFIXES = [
133133
'/invite',
134134
'/playground',
135135
'/unsubscribe',
136+
// 404s in production (see app/landing-preview/page.tsx) and its subroutes
137+
// (marks-lab, readme-tour-capture) never render the (landing) layout either
138+
'/landing-preview',
136139
]
137140

138141
export function isNonLandingPath(pathname: string): boolean {

0 commit comments

Comments
 (0)