fix(analytics): use greedy regex in PostHog ingest rewrites (#481)

Vercel's :path* wildcard doesn't match trailing slashes that
PostHog SDK appends (e.g. /ingest/s/?compression=...), causing 404s.
Switch to :path(.*) which matches all path segments including
trailing slashes. Ref: PostHog/posthog#17596
This commit is contained in:
Elie Habib
2026-02-27 23:12:44 +04:00
committed by GitHub
parent b87402bc06
commit 0e10195fab

View File

@@ -1,8 +1,8 @@
{
"ignoreCommand": "if [ -z \"$VERCEL_GIT_PREVIOUS_SHA\" ]; then exit 1; fi; git cat-file -e $VERCEL_GIT_PREVIOUS_SHA 2>/dev/null || exit 1; git diff --quiet $VERCEL_GIT_PREVIOUS_SHA HEAD -- ':!*.md' ':!.planning' ':!docs/' ':!e2e/' ':!scripts/' ':!.github/'",
"rewrites": [
{ "source": "/ingest/static/:path*", "destination": "https://us-assets.i.posthog.com/static/:path*" },
{ "source": "/ingest/:path*", "destination": "https://us.i.posthog.com/:path*" }
{ "source": "/ingest/static/:path(.*)", "destination": "https://us-assets.i.posthog.com/static/:path" },
{ "source": "/ingest/:path(.*)", "destination": "https://us.i.posthog.com/:path" }
],
"headers": [
{