fix: use correct PostHog API host from environment variable

Changed from hardcoded '/ingest' to VITE_PUBLIC_POSTHOG_HOST env var to ensure PostHog events are sent to the correct EU endpoint.
This commit is contained in:
echo 2026-03-01 02:09:21 +01:00
parent dea569df99
commit d0428aff0c

View File

@ -13,13 +13,16 @@ initializeTheme();
const queryClient = new QueryClient()
const posthogOptions = {
api_host: '/ingest',
ui_host: import.meta.env.VITE_PUBLIC_POSTHOG_HOST || 'https://eu.posthog.com',
api_host: import.meta.env.VITE_PUBLIC_POSTHOG_HOST,
defaults: '2026-01-30',
capture_exceptions: true,
debug: import.meta.env.DEV,
} as const
// Debug PostHog configuration
console.log('PostHog Config:', {
apiKey: import.meta.env.VITE_PUBLIC_POSTHOG_KEY ? '✓ Set' : '✗ Missing',
apiHost: import.meta.env.VITE_PUBLIC_POSTHOG_HOST,
})
ReactDOM.createRoot(document.getElementById('root')!).render(
<StrictMode>
<PostHogProvider