mirror of
https://github.com/koala73/worldmonitor.git
synced 2026-04-25 17:14:57 +02:00
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:
@@ -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": [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user