diff --git a/surfsense_web/instrumentation-client.ts b/surfsense_web/instrumentation-client.ts index 31a4e620e..bb2bd08c5 100644 --- a/surfsense_web/instrumentation-client.ts +++ b/surfsense_web/instrumentation-client.ts @@ -5,9 +5,9 @@ function initPostHog() { if (!process.env.NEXT_PUBLIC_POSTHOG_KEY) return; posthog.init(process.env.NEXT_PUBLIC_POSTHOG_KEY, { - api_host: "/ingest", + api_host: "https://assets.surfsense.com", ui_host: "https://us.posthog.com", - defaults: "2025-11-30", + defaults: "2026-01-30", capture_pageview: "history_change", capture_pageleave: true, before_send: (event) => { diff --git a/surfsense_web/next.config.ts b/surfsense_web/next.config.ts index 2b8c31062..075383682 100644 --- a/surfsense_web/next.config.ts +++ b/surfsense_web/next.config.ts @@ -52,27 +52,6 @@ const nextConfig: NextConfig = { return config; }, - - // PostHog reverse proxy configuration - // This helps bypass ad blockers by routing requests through your domain - async rewrites() { - return [ - { - 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/decide", - destination: "https://us.i.posthog.com/decide", - }, - ]; - }, - // Required for PostHog reverse proxy to work correctly - skipTrailingSlashRedirect: true, }; // Wrap the config with MDX and next-intl plugins