[BUGFIX] Setting content type for pagetype 5000

This commit is contained in:
Philipp Dieter 2020-10-19 22:50:47 +02:00
parent 5e7953acde
commit b7f93518d0

View File

@ -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;