Merge pull request #3230 from Icinga/bugfix/application-state-log-out-2882

/application-state: ignore unauthenticated requests
This commit is contained in:
lippserd 2018-01-16 10:20:13 +01:00 committed by GitHub
commit 44fccfff4d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -14,9 +14,13 @@ use Icinga\Web\Session;
*/
class ApplicationStateController extends Controller
{
protected $requiresAuthentication = false;
public function indexAction()
{
$this->_helper->layout()->disableLayout();
if ($this->Auth()->isAuthenticated()) {
if (isset($_COOKIE['icingaweb2-session'])) {
$last = (int) $_COOKIE['icingaweb2-session'];
} else {
@ -53,6 +57,7 @@ class ApplicationStateController extends Controller
$this->getResponse()->setHeader('X-Icinga-Announcements', 'refresh', true);
}
}
}
$this->getResponse()->setHeader('X-Icinga-Container', 'ignore', true);
}