From 7e27158e181350a081822d4967dbf4dd83ae9c6a Mon Sep 17 00:00:00 2001 From: Carsten Date: Wed, 10 Aug 2022 15:49:41 +0200 Subject: [PATCH] remove cache control headers, fix is needed for them --- application/controllers/ImgController.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/application/controllers/ImgController.php b/application/controllers/ImgController.php index d19647d..5cc40ed 100644 --- a/application/controllers/ImgController.php +++ b/application/controllers/ImgController.php @@ -196,14 +196,15 @@ public function indexAction() $imageHtml = ""; $res = $this->getMyimageHtml($serviceName, $hostName, $imageHtml); header('Pragma: public'); + /* makes trouble with IcingaDB or php8.1 if($this->refresh == "yes") { - header('Pragma: public'); header("Expires: ".gmdate("D, d M Y H:i:s", time() + $this->cacheTime)." GMT"); header('Cache-Control: max-age='.$this->cacheTime).', public'; } else { header("Expires: ".gmdate("D, d M Y H:i:s", time() + 365*86440)." GMT"); header('Cache-Control: max-age='. (365*86440)); } + */ header("Content-type: image/png"); if (! $res) { @@ -354,4 +355,4 @@ private function getMyimageHtml($serviceName, $hostName, &$imageHtml) $imageHtml = $res; return true; } -} \ No newline at end of file +}