mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-12-02 13:32:43 -05:00
More security for extension files: nosniff (#9593)
Global `X-Content-Type-Options: nosniff` And follow-up of #7753
This commit is contained in:
1 parent
13280a4dfc
commit
8ffddc11f8
5 files changed
+8
-2
No files matched your search
@@ -360,6 +360,7 @@ class FreshRSS_extension_Controller extends FreshRSS_ActionController {
|
||||
$content_type = self::MIME_TYPES[$mimeType];
|
||||
header("Content-Type: {$content_type}");
|
||||
header("Content-Disposition: inline; filename='{$filename}'");
|
||||
header('X-Content-Type-Options: nosniff');
|
||||
header('Referrer-Policy: same-origin');
|
||||
if (file_exists(DATA_PATH . '/no-cache.txt') || !httpConditional($mtime, cacheSeconds: 604800, cachePrivacy: 0)) {
|
||||
$contents = $extension->getFile($filename);
|
||||
|
||||
Reference in new issue
Block a user