From b7f93518d0cda16d0d6867aa5cdeea74072ceada Mon Sep 17 00:00:00 2001 From: Philipp Dieter Date: Mon, 19 Oct 2020 22:50:47 +0200 Subject: [PATCH] [BUGFIX] Setting content type for pagetype 5000 --- Classes/Controller/ActionController.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Classes/Controller/ActionController.php b/Classes/Controller/ActionController.php index 301daaa..02a78e6 100644 --- a/Classes/Controller/ActionController.php +++ b/Classes/Controller/ActionController.php @@ -662,10 +662,9 @@ class ActionController extends BaseController } else { $this->response->setStatus($this->responseStatus); } - $this->response->setHeader( - 'Content-type', - 'application/json' - ); + if ($this->pageType == $this->ajaxPageType) { + $GLOBALS['TSFE']->setContentType('application/json'); + } unset($result['data']); if ($this->redirect) { $result['redirect'] = $this->redirect;