fix(frontend): suppress cross-origin stylesheet security error

Add `ignoreErrors` to Sentry client config to filter out
`SecurityError: CSSStyleSheet.cssRules getter: Not allowed to access
cross-origin stylesheet` errors. These are caused by Sentry Replay
(rrweb) attempting to serialize DOM snapshots that include cross-origin
stylesheets from browser extensions or CDN-loaded CSS.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Lluis Agusti
2026-02-12 19:31:24 +08:00
parent a78145505b
commit 02fde96f08

View File

@@ -22,6 +22,11 @@ Sentry.init({
enabled: shouldEnable,
// Suppress cross-origin stylesheet errors from Sentry Replay (rrweb)
// serializing DOM snapshots with cross-origin stylesheets
// (e.g., from browser extensions or CDN-loaded CSS)
ignoreErrors: [/Not allowed to access cross-origin stylesheet/],
// Add optional integrations for additional features
integrations: [
Sentry.captureConsoleIntegration(),