Skip to content

Commit b752999

Browse files
author
Stanislav Idolov
authored
ENGCOM-1865: [Backport] Added additional headers for avoiding customer data caching #15776
2 parents 7e2022c + 2030906 commit b752999

File tree

1 file changed

+2
-0
lines changed
  • app/code/Magento/Customer/Controller/Section

1 file changed

+2
-0
lines changed

app/code/Magento/Customer/Controller/Section/Load.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ public function execute()
6161
{
6262
/** @var \Magento\Framework\Controller\Result\Json $resultJson */
6363
$resultJson = $this->resultJsonFactory->create();
64+
$resultJson->setHeader('Cache-Control', 'max-age=0, must-revalidate, no-cache, no-store', true);
65+
$resultJson->setHeader('Pragma', 'no-cache', true);
6466
try {
6567
$sectionNames = $this->getRequest()->getParam('sections');
6668
$sectionNames = $sectionNames ? array_unique(\explode(',', $sectionNames)) : null;

0 commit comments

Comments
 (0)