Commit 14e2caef authored by Matthias Larisch's avatar Matthias Larisch

fix merge mistake

parent dc5adff3
Pipeline #48475538 canceled with stages
......@@ -103,20 +103,15 @@ if (isset($_GET['f'])) {
header('HTTP/1.1 403 Forbidden');
die('Permission denied');
}
/*
* check for page caching
*/
ob_start();
echo $xhr->$func($_GET);
$page = ob_get_contents();
ob_end_clean();
if ($page[0] == '{' || $page[0] == '[') {
// just assume it's an JSON, to prevent the browser from interpreting it as
// HTML, which could result in XSS possibilities
header('Content-Type: application/json');
}
echo $page;
/*
* check for page caching
*/
if (isset($cache) && $cache->shouldCache()) {
$cache->cache($page);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment