mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-30 12:39:20 +03:00
Slight modification for https://github.com/the-djmaze/snappymail/issues/16
By default we use image proxy for privacy. This does not solve mailing tracking for hidden "read" images
This commit is contained in:
parent
d735893cd6
commit
b8357fd739
2 changed files with 5 additions and 2 deletions
|
|
@ -179,7 +179,7 @@ class Application extends \RainLoop\Config\AbstractConfig
|
|||
'hide_x_mailer_header' => array(true),
|
||||
'admin_panel_host' => array(''),
|
||||
'admin_panel_key' => array('admin'),
|
||||
'content_security_policy' => array(APP_DEFAULT_CSP),
|
||||
'content_security_policy' => array(''),
|
||||
'core_install_access_domain' => array('')
|
||||
),
|
||||
|
||||
|
|
@ -388,7 +388,7 @@ Enables caching in the system'),
|
|||
'fast_cache_memcache_port' => array(11211),
|
||||
'fast_cache_redis_host' => array('127.0.0.1'),
|
||||
'fast_cache_redis_port' => array(6379),
|
||||
'use_local_proxy_for_external_images' => array(false),
|
||||
'use_local_proxy_for_external_images' => array(true),
|
||||
'detect_image_exif_orientation' => array(true),
|
||||
'cookie_default_path' => array(''),
|
||||
'cookie_default_secure' => array(false),
|
||||
|
|
|
|||
|
|
@ -42,6 +42,9 @@ class Service
|
|||
\header('X-Content-Type-Options: nosniff');
|
||||
|
||||
$sContentSecurityPolicy = \trim($this->oActions->Config()->Get('security', 'content_security_policy', '')) ?: APP_DEFAULT_CSP;
|
||||
if ($this->oActions->Config()->Get('security', 'use_local_proxy_for_external_images', '')) {
|
||||
$sContentSecurityPolicy = preg_replace('/(img-src[^;]+)\\shttps:(\\s|;|$)/D', '$1$2', $sContentSecurityPolicy);
|
||||
}
|
||||
\header('Content-Security-Policy: '.$sContentSecurityPolicy, true);
|
||||
|
||||
$sXFrameOptionsHeader = \trim($this->oActions->Config()->Get('security', 'x_frame_options_header', '')) ?: 'DENY';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue