Merge pull request #3503 from Icinga/fix/let-redirect-http-use-http-for-redirection
This commit is contained in:
commit
2a48bd0f5e
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -343,6 +343,12 @@
|
|||
}
|
||||
}
|
||||
|
||||
var useHttp = req.getResponseHeader('X-Icinga-Redirect-Http');
|
||||
if (useHttp === 'yes') {
|
||||
window.location.replace(redirect);
|
||||
return true;
|
||||
}
|
||||
|
||||
this.redirectToUrl(
|
||||
redirect, req.$target, req.url, req.getResponseHeader('X-Icinga-Rerender-Layout'), req.forceFocus,
|
||||
req.getResponseHeader('X-Icinga-Refresh')
|
||||
|
|
Loading…
Reference in New Issue