ActionController: Force HTTP redirects in method redirectHttp()

That's what its name implies, right? The counterpart is redirectXhr(),
which does still its job. redirectNow() on the other hand is for the
lazy people.
This commit is contained in:
Johannes Meyer 2018-07-04 11:22:37 +02:00
parent 990df95f36
commit 1f677e64f6
1 changed files with 4 additions and 0 deletions

View File

@ -424,6 +424,10 @@ class ActionController extends Zend_Controller_Action
protected function redirectHttp($url)
{
if ($this->isXhr()) {
$this->getResponse()->setHeader('X-Icinga-Redirect-Http', 'yes');
}
$this->getResponse()->redirectAndExit($url);
}