diff --git a/admin/code/LeftAndMain.php b/admin/code/LeftAndMain.php index 38b2bb21f..e1e27983c 100644 --- a/admin/code/LeftAndMain.php +++ b/admin/code/LeftAndMain.php @@ -353,7 +353,9 @@ class LeftAndMain extends Controller implements PermissionProvider { function redirect($url, $code=302) { if($this->request->isAjax()) { $this->response->addHeader('X-ControllerURL', $url); - if($header = $this->request->getHeader('X-Pjax')) $this->response->addHeader('X-Pjax', $header); + if($this->request->getHeader('X-Pjax') && !$this->response->getHeader('X-Pjax')) { + $this->response->addHeader('X-Pjax', $this->request->getHeader('X-Pjax')); + } return ''; // Actual response will be re-requested by client } else { parent::redirect($url, $code);