From 0a4790ee46e7e1f19e760106e9f895a20ebd8ed2 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Wed, 29 Mar 2017 13:21:02 +0200 Subject: Add param to disable HSTS, set headers to prevent caching --- api.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'api.php') diff --git a/api.php b/api.php index fdccf14a..a9eec1e7 100644 --- a/api.php +++ b/api.php @@ -42,8 +42,13 @@ if (Module::isAvailable($module)) { if (!file_exists($module)) { Util::traceError('Invalid module, or module without API: ' . $module); } +Header('Expires: Wed, 29 Mar 2007 09:56:28 GMT'); +Header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0"); +Header("Cache-Control: post-check=0, pre-check=0", false); +Header("Pragma: no-cache"); Header('Content-Type: text/plain; charset=utf-8'); + ob_start('ob_gzhandler'); // Load module - it will execute pre-processing, or act upon request parameters require_once($module); -- cgit v1.2.3-55-g7522