diff options
Diffstat (limited to 'app/FreshRSS.php')
| -rw-r--r-- | app/FreshRSS.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/app/FreshRSS.php b/app/FreshRSS.php index 044de9cd4..bafa970da 100644 --- a/app/FreshRSS.php +++ b/app/FreshRSS.php @@ -110,6 +110,21 @@ class FreshRSS extends Minz_FrontController { } } + public static function preLayout() { + switch (Minz_Request::controllerName()) { + case 'index': + header("Content-Security-Policy: default-src 'self'; child-src *; frame-src *; img-src * data:; media-src *"); + break; + case 'stats': + header("Content-Security-Policy: default-src 'self'; style-src 'self' 'unsafe-inline'"); + break; + default: + header("Content-Security-Policy: default-src 'self'"); + break; + } + header("X-Content-Type-Options: nosniff"); + } + private function loadNotifications() { $notif = Minz_Session::param('notification'); if ($notif) { |
