Skip to content

Commit a3f022e

Browse files
committed
MUI controller lacks JSON return, instead returns status 200 with empty body
1 parent b1d3061 commit a3f022e

File tree

1 file changed

+8
-0
lines changed
  • app/code/Magento/Ui/Controller/Adminhtml/Index

1 file changed

+8
-0
lines changed

app/code/Magento/Ui/Controller/Adminhtml/Index/Render.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,14 @@ public function execute()
8686

8787
$contentType = $this->contentTypeResolver->resolve($component->getContext());
8888
$this->getResponse()->setHeader('Content-Type', $contentType, true);
89+
}else {
90+
/** @var \Magento\Framework\Controller\Result\Json $resultJson */
91+
$resultJson = $this->resultJsonFactory->create();
92+
$resultJson->setStatusHeader(
93+
\Zend\Http\Response::STATUS_CODE_403,
94+
\Zend\Http\AbstractMessage::VERSION_11,
95+
'Forbidden'
96+
);
8997
}
9098
} catch (\Magento\Framework\Exception\LocalizedException $e) {
9199
$this->logger->critical($e);

0 commit comments

Comments
 (0)