Skip to content

Commit f195e1b

Browse files
Mlaz-codeclaude
andcommitted
fix(vercel): rewrite /ingest/* with trailing slash to PostHog
PostHog's JS SDK POSTs to /ingest/s/, /ingest/e/, /ingest/i/v0/e/ with trailing slashes. The existing /ingest/:path* rewrite matched only no-trailing-slash paths, so Vercel served cached 404s for ~27/hr — 540 events in a 20h window, analytics data silently dropped. Adds :path+/ variant before the :path* rule. Also drops the dead /ingest/decide rule (already covered by the wildcard). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 8580160 commit f195e1b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

vercel.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
],
3535
"rewrites": [
3636
{ "source": "/ingest/static/:path*", "destination": "https://us-assets.i.posthog.com/static/:path*" },
37-
{ "source": "/ingest/:path*", "destination": "https://us.i.posthog.com/:path*" },
38-
{ "source": "/ingest/decide", "destination": "https://us.i.posthog.com/decide" }
37+
{ "source": "/ingest/:path+/", "destination": "https://us.i.posthog.com/:path+/" },
38+
{ "source": "/ingest/:path*", "destination": "https://us.i.posthog.com/:path*" }
3939
]
4040
}

0 commit comments

Comments
 (0)