Skip to content

Instantly share code, notes, and snippets.

@johanguse
Last active August 15, 2025 17:14
Show Gist options
  • Select an option

  • Save johanguse/73f5d96691badb5d2916070ab385d011 to your computer and use it in GitHub Desktop.

Select an option

Save johanguse/73f5d96691badb5d2916070ab385d011 to your computer and use it in GitHub Desktop.
vercel posthog reverse proxy nextjs
{
"rewrites": [
{
"source": "/ingest/:path*",
"destination": "https://app.posthog.com/:path*"
},
{
"source": "/decide/:path*",
"destination": "https://app.posthog.com/decide/:path*"
},
{
"source": "/e/:path*",
"destination": "https://app.posthog.com/e/:path*"
},
{
"source": "/s/:path*",
"destination": "https://app.posthog.com/s/:path*"
},
{
"source": "/capture/:path*",
"destination": "https://app.posthog.com/capture/:path*"
},
{
"source": "/batch/:path*",
"destination": "https://app.posthog.com/batch/:path*"
},
{
"source": "/api/surveys/:path*",
"destination": "https://app.posthog.com/api/surveys/:path*"
},
{
"source": "/static/survey/:path*",
"destination": "https://app.posthog.com/static/survey/:path*"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment