filter the hash from error reports

This commit is contained in:
Danny Coates 2017-08-02 14:13:53 -07:00
parent d208a82089
commit 5944b85e67
No known key found for this signature in database
GPG key ID: 4C442633C62E00CB
5 changed files with 28 additions and 10 deletions

View file

@ -5,11 +5,24 @@ if (isIE && !isUnsupportedPage) {
window.location.replace('/unsupported/ie');
}
{{#if dsn}}
window.dsn = '{{{dsn}}}';
{{#if sentryId}}
var RAVEN_CONFIG = {
release: '{{{version}}}',
tags: {
commit: '{{{commit}}}'
},
dataCallback: function (data) {
var hash = window.location.hash;
if (hash) {
return JSON.parse(JSON.stringify(data).replace(new RegExp(hash.slice(1), 'g'), ''));
}
return data;
}
}
var SENTRY_ID = '{{{sentryId}}}';
{{/if}}
{{#if trackerId}}
window.trackerId = '{{{trackerId}}}';
{{#if googleAnalyticsId}}
var GOOGLE_ANALYTICS_ID = '{{{googleAnalyticsId}}}';
{{/if}}
var MAXFILESIZE = {{{maxFileSize}}};
var EXPIRE_SECONDS = {{{expireSeconds}}};