The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
fix: set PostHog ui_host for toolbar auth (#41478)
Sean Oliver0b04a7b303b7
diff --git a/packages/common/posthog-client.ts b/packages/common/posthog-client.tsindex 042cf62e439..981e87bf0eb 100644--- a/packages/common/posthog-client.ts+++ b/packages/common/posthog-client.ts@@ -8,6 +8,7 @@ const MAX_PENDING_EVENTS = 20interface PostHogClientConfig {apiKey?: stringapiHost?: string+ uiHost?: string}class PostHogClient {@@ -22,10 +23,15 @@ class PostHogClient {private readonly maxPendingEvents = MAX_PENDING_EVENTSconstructor(config: PostHogClientConfig = {}) {+ const apiHost =+ config.apiHost || process.env.NEXT_PUBLIC_POSTHOG_HOST || 'https://ph.supabase.green'+ const uiHost =+ config.uiHost || process.env.NEXT_PUBLIC_POSTHOG_UI_HOST || 'https://eu.posthog.com'+this.config = {apiKey: config.apiKey || process.env.NEXT_PUBLIC_POSTHOG_KEY,- apiHost:- config.apiHost || process.env.NEXT_PUBLIC_POSTHOG_HOST || 'https://ph.supabase.green',+ apiHost,+ uiHost,}}@@ -39,6 +45,7 @@ class PostHogClient {const config: Partial<PostHogConfig> = {api_host: this.config.apiHost,+ ui_host: this.config.uiHost,autocapture: false, // We'll manually track eventscapture_pageview: false, // We'll manually track pageviewscapture_pageleave: false, // We'll manually track page leaves