fix: disable Sentry tracing to prevent CORS failures on Matrix requests
browserTracingIntegration injects sentry-trace and baggage headers into all outgoing fetch calls. Synapse does not list these in Access-Control-Allow-Headers, so every Matrix API call was blocked by the browser CORS preflight check. Removed browserTracingIntegration, set tracePropagationTargets:[] and tracesSampleRate:0. Error capture (the useful part) is unaffected. CSP fix (Sentry ingest domain) is applied via nginx — no code change needed. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+5
-7
@@ -13,13 +13,11 @@ if (sentryDsn) {
|
||||
dsn: sentryDsn,
|
||||
environment: import.meta.env.MODE,
|
||||
release: import.meta.env.VITE_APP_VERSION,
|
||||
integrations: [
|
||||
Sentry.browserTracingIntegration(),
|
||||
],
|
||||
// Only trace requests to our own Matrix homeserver
|
||||
tracePropagationTargets: ['localhost', /^https:\/\/matrix\.lotusguild\.org/],
|
||||
// 5% of transactions — enough signal without burning quota
|
||||
tracesSampleRate: 0.05,
|
||||
// browserTracingIntegration omitted — it injects sentry-trace/baggage headers
|
||||
// into outgoing fetch calls, which breaks Synapse CORS on matrix.lotusguild.org
|
||||
// No propagation targets — we don't control the Matrix server's CORS allow-list
|
||||
tracePropagationTargets: [],
|
||||
tracesSampleRate: 0,
|
||||
// Don't send PII (IPs, usernames) — this is a private chat app
|
||||
sendDefaultPii: false,
|
||||
// Forward Sentry logs to the dashboard
|
||||
|
||||
Reference in New Issue
Block a user