Skip to content

Commit

Permalink
�Fix regex for Sentry urls and add checks to ensure that correct doma…
Browse files Browse the repository at this point in the history
…in is matched
  • Loading branch information
MajorLift authored Nov 22, 2024
1 parent 9142f93 commit cfdcfcc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/scripts/lib/setupSentry.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@ function getClientOptions() {
Sentry.browserTracingIntegration({
shouldCreateSpanForRequest: (url) => {
// Do not create spans for outgoing requests to a 'sentry.io' domain.
return !url.match(/sentry\.io\/?$/u);
return !url.match(
/^https?:\/\/([\w\d.@-]+\.)?sentry\.io(\/|$)/u
);
},
}),
filterEvents({ getMetaMetricsEnabled, log }),
Expand Down

0 comments on commit cfdcfcc

Please sign in to comment.