fix(analytics): use greedy regex in PostHog ingest rewrites#481
Merged
Conversation
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
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
5 tasks
koala73
added a commit
that referenced
this pull request
Mar 1, 2026
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
Summary
/ingest/*404 errors by switching Vercel rewrite patterns from:path*to:path(.*):path*wildcard silently fails on trailing slashes that PostHog SDK appends (e.g./ingest/s/?compression=...)Test plan
us.i.posthog.com(no 404s in browser console)/ingest/static/*assets still load (PostHog JS bundle)