(sentry) improve configuration

This commit is contained in:
Valentyne Stigloher 2024-03-08 00:45:49 +01:00
parent 91de9e68d1
commit 276332c943

View File

@ -226,6 +226,11 @@ const nuxtConfig: NuxtConfig = {
telemetry: false,
},
config: {
attachStacktrace: true,
initialScope(scope) {
scope.setTag('locale', process.env.LOCALE);
return scope;
},
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/
@ -238,6 +243,30 @@ const nuxtConfig: NuxtConfig = {
return event;
},
},
clientConfig: {
denyUrls: [
'chrome-extension://',
'moz-extension://',
'webkit-masked-url://',
's0.2mdn.net',
'j.adlooxtracking.com',
'c.amazon-adsystem.com',
'assets.a-mo.net',
'btloader.com',
'challenges.cloudflare.com',
'static.criteo.net',
'securepubads.g.doubleclick.net',
'cdn.flashtalking.com',
'ajs-assets.ftstatic.com',
'cdn.fuseplatform.net',
'cmp.inmobi.com',
'cdn.js7k.com',
'z.moatads.com',
'ced-ns.sascdn.com',
'a.teads.tv',
's.yimg.com',
],
},
},
publicRuntimeConfig: {
...config,