mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Add sentry support
This commit is contained in:
parent
23451c032a
commit
88439e6e07
3 changed files with 9 additions and 0 deletions
|
|
@ -299,6 +299,8 @@ Disabling this option is not recommended.'),
|
||||||
'time_offset' => array('0'),
|
'time_offset' => array('0'),
|
||||||
'session_filter' => array(''),
|
'session_filter' => array(''),
|
||||||
|
|
||||||
|
'sentry_dsn' => array(''),
|
||||||
|
|
||||||
'filename' => array('log-{date:Y-m-d}.txt',
|
'filename' => array('log-{date:Y-m-d}.txt',
|
||||||
'Log filename.
|
'Log filename.
|
||||||
For security reasons, some characters are removed from filename.
|
For security reasons, some characters are removed from filename.
|
||||||
|
|
|
||||||
|
|
@ -290,8 +290,13 @@ class Service
|
||||||
$sAppleTouchLink = $sFaviconUrl ? '' : $this->staticPath('apple-touch-icon.png');
|
$sAppleTouchLink = $sFaviconUrl ? '' : $this->staticPath('apple-touch-icon.png');
|
||||||
|
|
||||||
$sContentSecurityPolicy = $this->oActions->Config()->Get('security', 'content_security_policy', '');
|
$sContentSecurityPolicy = $this->oActions->Config()->Get('security', 'content_security_policy', '');
|
||||||
|
$sSentryDsn = $this->oActions->Config()->Get('logs', 'sentry_dsn', '');
|
||||||
|
|
||||||
$aTemplateParameters = array(
|
$aTemplateParameters = array(
|
||||||
|
'{{BaseAppHeadScriptLink}}' => $sSentryDsn ?
|
||||||
|
'<script type="text/javascript" data-cfasync="false" src="https://browser.sentry-cdn.com/5.0.8/bundle.min.js" crossorigin="anonymous"></script>' : '',
|
||||||
|
'{{BaseAppBodyScript}}' => $sSentryDsn ?
|
||||||
|
'<script type="text/javascript" data-cfasync="false">window && window.Sentry && window.Sentry.init({dsn:\''.$sSentryDsn.'\',ignoreErrors:[\'Document not active\']});</script>' : '',
|
||||||
'{{BaseAppFaviconPngLinkTag}}' => $sFaviconPngLink ? '<link type="image/png" rel="shortcut icon" href="'.$sFaviconPngLink.'" />' : '',
|
'{{BaseAppFaviconPngLinkTag}}' => $sFaviconPngLink ? '<link type="image/png" rel="shortcut icon" href="'.$sFaviconPngLink.'" />' : '',
|
||||||
'{{BaseAppFaviconTouchLinkTag}}' => $sAppleTouchLink ? '<link type="image/png" rel="apple-touch-icon" href="'.$sAppleTouchLink.'" />' : '',
|
'{{BaseAppFaviconTouchLinkTag}}' => $sAppleTouchLink ? '<link type="image/png" rel="apple-touch-icon" href="'.$sAppleTouchLink.'" />' : '',
|
||||||
'{{BaseAppMainCssLink}}' => $this->staticPath('css/app'.($bAppCssDebug ? '' : '.min').'.css'),
|
'{{BaseAppMainCssLink}}' => $this->staticPath('css/app'.($bAppCssDebug ? '' : '.min').'.css'),
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@
|
||||||
<meta name="AppBootData" content='{{RainloopBootData}}' id="app-boot-data" />
|
<meta name="AppBootData" content='{{RainloopBootData}}' id="app-boot-data" />
|
||||||
{{BaseContentSecurityPolicy}}
|
{{BaseContentSecurityPolicy}}
|
||||||
<title></title>
|
<title></title>
|
||||||
|
{{BaseAppHeadScriptLink}}
|
||||||
{{BaseAppFaviconPngLinkTag}}
|
{{BaseAppFaviconPngLinkTag}}
|
||||||
{{BaseAppFaviconTouchLinkTag}}
|
{{BaseAppFaviconTouchLinkTag}}
|
||||||
<link type="text/css" rel="stylesheet" href="{{BaseAppMainCssLink}}" />
|
<link type="text/css" rel="stylesheet" href="{{BaseAppMainCssLink}}" />
|
||||||
|
|
@ -25,6 +26,7 @@
|
||||||
<body>
|
<body>
|
||||||
<div id="rl-app"></div>
|
<div id="rl-app"></div>
|
||||||
<div id="rl-check"></div>
|
<div id="rl-check"></div>
|
||||||
|
{{BaseAppBodyScript}}
|
||||||
<script type="text/javascript" data-cfasync="false" src="{{BaseAppBootScriptLink}}"></script>
|
<script type="text/javascript" data-cfasync="false" src="{{BaseAppBootScriptLink}}"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue