History

fix(cloud): proxy marketing's og-image + graph-paper to marketing worker

The cloud worker owns executor.sh and only proxies an allow-list of paths to executor-marketing, so /og-image.png and /pattern-graph-paper.svg were falling through to the TanStack app and 404ing. Add both to the list.

Rhys Sullivan committed 6 months ago

Commit 9b1d5961 parent 42674bb1 file · +10 −1Browse files

Unified · Split

apps/cloud/src/start.ts+10−1
@@ -9,7 +9,16 @@ import { handleSentryTunnelRequest } from "./sentry-tunnel"; · 8 unmodified lines
9// Marketing routes — proxied to the marketing worker via service binding9// Marketing routes — proxied to the marketing worker via service binding
10// ---------------------------------------------------------------------------10// ---------------------------------------------------------------------------
11 11
12const MARKETING_PATHS = ["/home", "/setup", "/privacy", "/terms", "/api/detect", "/_astro"];12const MARKETING_PATHS = [
13 "/home",
14 "/setup",
15 "/privacy",
16 "/terms",
17 "/api/detect",
18 "/_astro",
19 "/og-image.png",
20 "/pattern-graph-paper.svg",
21];
13 22
14const isMarketingPath = (pathname: string) =>23const isMarketingPath = (pathname: string) =>
15 MARKETING_PATHS.some((p) => pathname === p || pathname.startsWith(`${p}/`));24 MARKETING_PATHS.some((p) => pathname === p || pathname.startsWith(`${p}/`));