diff --git a/library/Icinga/Web/Controller/ActionController.php b/library/Icinga/Web/Controller/ActionController.php index b783ed6c0..ab7083314 100644 --- a/library/Icinga/Web/Controller/ActionController.php +++ b/library/Icinga/Web/Controller/ActionController.php @@ -77,8 +77,6 @@ class ActionController extends Zend_Controller_Action private $autorefreshInterval; - private $noXhrBody = false; - private $reloadCss = false; private $window; @@ -283,7 +281,9 @@ class ActionController extends Zend_Controller_Action protected function ignoreXhrBody() { - $this->noXhrBody = true; + if ($this->getRequest()->isXmlHttpRequest()) { + $this->getResponse()->setHeader('X-Icinga-Container', 'ignore'); + } } public function setAutorefreshInterval($interval) @@ -395,11 +395,6 @@ class ActionController extends Zend_Controller_Action $resp->setHeader('X-Icinga-CssReload', 'now'); } - if ($this->noXhrBody) { - $resp->setHeader('X-Icinga-Container', 'ignore'); - return; - } - if ($this->view->title) { if (preg_match('~[\r\n]~', $this->view->title)) { // TODO: Innocent exception and error log for hack attempts