diff --git a/instrumentation-client.ts b/instrumentation-client.ts index e6044c0..9a3598e 100644 --- a/instrumentation-client.ts +++ b/instrumentation-client.ts @@ -1,7 +1,7 @@ import posthog from "posthog-js"; posthog.init(process.env.NEXT_PUBLIC_POSTHOG_KEY as string, { - api_host: "/_ingest", + api_host: "/_proxy/ingest", ui_host: "https://us.posthog.com", defaults: "2025-05-24", capture_exceptions: true, // This enables capturing exceptions using Error Tracking, set to false if you don't want this diff --git a/next.config.ts b/next.config.ts index 89425a9..ec252b1 100644 --- a/next.config.ts +++ b/next.config.ts @@ -23,11 +23,11 @@ const nextConfig: NextConfig = { rewrites: async () => { return [ { - source: "/_ingest/static/:path*", + source: "/_proxy/ingest/static/:path*", destination: "https://us-assets.i.posthog.com/static/:path*", }, { - source: "/_ingest/:path*", + source: "/_proxy/ingest/:path*", destination: "https://us.i.posthog.com/:path*", }, ];