0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-17 23:44:39 -05:00

Filtered portal script url for Sentry error reporting

no refs

By default, Sentry will pick up any uncaught error triggered from the site, which adds a lot of noise as we only want to listen to Portal specific errors. This change adds portal's unpkg script as the only allowed url for Sentry error reporting.
This commit is contained in:
Rishabh 2021-06-24 21:01:23 +05:30
parent 42eb39df0b
commit 05999e0c81

View file

@ -382,7 +382,10 @@ export default class App extends React.Component {
Sentry.init({ Sentry.init({
dsn: portalSentry.dsn, dsn: portalSentry.dsn,
environment: portalSentry.env || 'development', environment: portalSentry.env || 'development',
release: `portal@${portalVersion}|ghost@${ghostVersion}` release: `portal@${portalVersion}|ghost@${ghostVersion}`,
allowUrls: [
/https?:\/\/((www)\.)?unpkg\.com\/@tryghost\/portal/
]
}); });
} }
} }