fix: Force posthog recording to be disabled outside cloud (#8374)

This commit is contained in:
Tomi Turtiainen 2024-01-18 14:44:27 +02:00 committed by GitHub
parent 1aa35b190a
commit f31cc0743f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 1 additions and 9 deletions

View file

@ -1143,12 +1143,6 @@ export const schema = {
default: 'https://ph.n8n.io', default: 'https://ph.n8n.io',
env: 'N8N_DIAGNOSTICS_POSTHOG_API_HOST', env: 'N8N_DIAGNOSTICS_POSTHOG_API_HOST',
}, },
disableSessionRecording: {
doc: 'Disable posthog session recording',
format: Boolean,
default: true,
env: 'N8N_DIAGNOSTICS_POSTHOG_DISABLE_RECORDING',
},
}, },
sentry: { sentry: {
dsn: { dsn: {

View file

@ -115,9 +115,7 @@ export class FrontendService {
apiHost: config.getEnv('diagnostics.config.posthog.apiHost'), apiHost: config.getEnv('diagnostics.config.posthog.apiHost'),
apiKey: config.getEnv('diagnostics.config.posthog.apiKey'), apiKey: config.getEnv('diagnostics.config.posthog.apiKey'),
autocapture: false, autocapture: false,
disableSessionRecording: config.getEnv( disableSessionRecording: config.getEnv('deployment.type') !== 'cloud',
'diagnostics.config.posthog.disableSessionRecording',
),
debug: config.getEnv('logs.level') === 'debug', debug: config.getEnv('logs.level') === 'debug',
}, },
personalizationSurveyEnabled: personalizationSurveyEnabled: