mirror of
https://github.com/simstudioai/sim.git
synced 2026-01-09 15:07:55 -05:00
fix(posthog): prevent redirects by whitelisting ingest route (#1615)
This commit is contained in:
committed by
GitHub
parent
4937d72d70
commit
ec73e2e9ce
@@ -17,8 +17,8 @@ export function PostHogProvider({ children }: { children: React.ReactNode }) {
|
||||
defaults: '2025-05-24',
|
||||
person_profiles: 'identified_only',
|
||||
capture_pageview: true,
|
||||
capture_pageleave: true,
|
||||
capture_performance: true,
|
||||
capture_pageleave: false,
|
||||
capture_performance: false,
|
||||
session_recording: {
|
||||
maskAllInputs: false,
|
||||
maskInputOptions: {
|
||||
@@ -26,13 +26,16 @@ export function PostHogProvider({ children }: { children: React.ReactNode }) {
|
||||
email: false,
|
||||
},
|
||||
recordCrossOriginIframes: false,
|
||||
recordHeaders: true,
|
||||
recordBody: true,
|
||||
recordHeaders: false,
|
||||
recordBody: false,
|
||||
},
|
||||
autocapture: true,
|
||||
capture_dead_clicks: true,
|
||||
autocapture: {
|
||||
dom_event_allowlist: ['click', 'submit', 'change'],
|
||||
element_allowlist: ['button', 'a', 'input'],
|
||||
},
|
||||
capture_dead_clicks: false,
|
||||
persistence: 'localStorage+cookie',
|
||||
enable_heatmaps: true,
|
||||
enable_heatmaps: false,
|
||||
})
|
||||
}
|
||||
}, [])
|
||||
|
||||
@@ -220,13 +220,13 @@ const nextConfig: NextConfig = {
|
||||
if (isHosted) {
|
||||
redirects.push(
|
||||
{
|
||||
source: '/((?!api|_next|_vercel|favicon|static|.*\\..*).*)',
|
||||
source: '/((?!api|_next|_vercel|favicon|static|ingest|.*\\..*).*)',
|
||||
destination: 'https://www.sim.ai/$1',
|
||||
permanent: true,
|
||||
has: [{ type: 'host' as const, value: 'simstudio.ai' }],
|
||||
},
|
||||
{
|
||||
source: '/((?!api|_next|_vercel|favicon|static|.*\\..*).*)',
|
||||
source: '/((?!api|_next|_vercel|favicon|static|ingest|.*\\..*).*)',
|
||||
destination: 'https://www.sim.ai/$1',
|
||||
permanent: true,
|
||||
has: [{ type: 'host' as const, value: 'www.simstudio.ai' }],
|
||||
|
||||
Reference in New Issue
Block a user