Add cookie support detection

refs #7383
This commit is contained in:
Alexander Fuhr 2014-11-26 14:25:05 +01:00
parent 1e8523aae6
commit d40e48cd8f
1 changed files with 17 additions and 0 deletions

View File

@ -12,6 +12,7 @@ use Icinga\Exception\ConfigurationError;
use Icinga\Exception\NotReadableError;
use Icinga\Application\Logger;
use Icinga\Util\TimezoneDetect;
use Icinga\Web\Cookie;
use Icinga\Web\Request;
use Icinga\Web\Response;
use Icinga\Web\View;
@ -91,6 +92,7 @@ class Web extends ApplicationBootstrap
{
return $this
->setupZendAutoloader()
->detectCookieSupport()
->setupLogging()
->setupErrorHandling()
->loadConfig()
@ -337,5 +339,20 @@ class Web extends ApplicationBootstrap
);
return $this;
}
/**
* Check cookie support
*
* @return $this
*/
protected function detectCookieSupport()
{
if (! Cookie::isSupported()) {
echo 'Cookies must be enabled to run this application.';
exit(1);
}
return $this;
}
}
// @codeCoverageIgnoreEnd