From 29271951308285e0b49884b30a3e076d3243fb79 Mon Sep 17 00:00:00 2001 From: Valentyne Stigloher Date: Sun, 3 Mar 2024 14:24:08 +0100 Subject: [PATCH] (sentry) disable sending of user information --- nuxt.config.ts | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/nuxt.config.ts b/nuxt.config.ts index 90783863d..3df35bc34 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -225,13 +225,26 @@ const nuxtConfig: NuxtConfig = { publishRelease: { telemetry: false, }, + config: { + beforeSend(event) { + // do not send user information as Sentry somehow automatically detects username, email and user id + // https://docs.sentry.io/platforms/javascript/data-management/sensitive-data/ + delete event.user; + return event; + }, + beforeSendTransaction(event) { + // see comment on nuxtConfig.sentry.config.beforeSend + delete event.user; + return event; + }, + }, }, publicRuntimeConfig: { ...config, plausible: { domain: process.env.PLAUSIBLE_DOMAIN || translations.domain, apiHost: process.env.PLAUSIBLE_API_HOST, - enableAutoPageviews: false, // see previous comment + enableAutoPageviews: false, // see comment on nuxtConfig.plausible.enableAutoPageviews }, }, watchers: {