Skip to content

Commit 2030906

Browse files
ENGCOM-1865: [Backport] Added additional headers for avoiding customer data caching #15776
- Merge Pull Request #15776 from rogyar/magento2:2.1-customer-section-headers - Merged commits: 1. 07f4c53
2 parents ba1ff18 + 07f4c53 commit 2030906

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)