aboutsummaryrefslogtreecommitdiff
path: root/p/ext.php
diff options
context:
space:
mode:
Diffstat (limited to 'p/ext.php')
-rw-r--r--p/ext.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/p/ext.php b/p/ext.php
index 4ee9eb1ae..2150f54e8 100644
--- a/p/ext.php
+++ b/p/ext.php
@@ -91,6 +91,12 @@ if (!is_valid_path($absolute_filename)) {
sendBadRequestResponse('File is not supported.');
}
+FreshRSS_Context::initSystem();
+if (!FreshRSS_Context::hasSystemConf()) {
+ header('HTTP/1.1 500 Internal Server Error');
+ die('Invalid system init!');
+}
+
$content_type = FreshRSS_extension_Controller::MIME_TYPES[$file_type];
header("Content-Type: {$content_type}");
header("Content-Disposition: inline; filename='{$file_name}'");