From 223ecda80e5a5a970457c27af818eb745f5b8414 Mon Sep 17 00:00:00 2001 From: Waleed Date: Sun, 5 Oct 2025 21:27:03 -0700 Subject: [PATCH] fix(posthog): add rewrites for posthog reverse proxy routes unconditionally, remove unused POSTHOG_ENABLED envvar (#1548) --- apps/sim/lib/env.ts | 1 - apps/sim/next.config.ts | 4 ---- 2 files changed, 5 deletions(-) diff --git a/apps/sim/lib/env.ts b/apps/sim/lib/env.ts index fbf065023..5dfea0aeb 100644 --- a/apps/sim/lib/env.ts +++ b/apps/sim/lib/env.ts @@ -89,7 +89,6 @@ export const env = createEnv({ TELEMETRY_ENDPOINT: z.string().url().optional(), // Custom telemetry/analytics endpoint COST_MULTIPLIER: z.number().optional(), // Multiplier for cost calculations LOG_LEVEL: z.enum(['DEBUG', 'INFO', 'WARN', 'ERROR']).optional(), // Minimum log level to display (defaults to ERROR in production, DEBUG in development) - POSTHOG_ENABLED: z.boolean().optional(), // Enable PostHog analytics and session recording // External Services BROWSERBASE_API_KEY: z.string().min(1).optional(), // Browserbase API key for browser automation diff --git a/apps/sim/next.config.ts b/apps/sim/next.config.ts index 15f92ab42..3bc9e83d1 100644 --- a/apps/sim/next.config.ts +++ b/apps/sim/next.config.ts @@ -239,10 +239,6 @@ const nextConfig: NextConfig = { return redirects }, async rewrites() { - if (!isTruthy(env.POSTHOG_ENABLED)) { - return [] - } - return [ { source: '/ingest/static/:path*',