0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-03-11 02:12:21 -05:00

Added sentry_dsn and sentry_env properties to /canary/site/

refs https://github.com/TryGhost/Team/issues/723

- enables Admin to report unhandled exceptions and API errors when configured
This commit is contained in:
Kevin Ansfield 2021-05-26 16:53:52 +01:00
parent 367b1a509f
commit 5fe9036ecf
2 changed files with 9 additions and 1 deletions

View file

@ -14,7 +14,9 @@ module.exports = {
'accent_color',
'url',
'version',
'oauth'
'oauth',
'sentry_dsn',
'sentry_env'
])
};
}

View file

@ -1,5 +1,6 @@
const ghostVersion = require('../../lib/ghost-version');
const settingsCache = require('../settings/cache');
const config = require('../../../shared/config');
const urlUtils = require('../../../shared/url-utils');
module.exports = function getSiteProperties() {
@ -18,5 +19,10 @@ module.exports = function getSiteProperties() {
siteProperties.oauth = true;
}
if (config.get('client_sentry') && !config.get('client_sentry').disabled) {
siteProperties.sentry_dsn = config.get('client_sentry').dsn;
siteProperties.sentry_env = config.get('env');
}
return siteProperties;
};