Skip to content

Commit

Permalink
Adds headers for association file
Browse files Browse the repository at this point in the history
Co-authored-by: Matthias RAIGNE <5262628+Matt75@users.noreply.github.com>
  • Loading branch information
L3RAZ and Matt75 authored Aug 21, 2024
1 parent 1302c4d commit a011a39
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions controllers/front/applepay.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,13 @@ public function postProcess()
$environment = $payPalConfiguration->getPaymentMode();
$associationFile = _PS_MODULE_DIR_ . "ps_checkout/.well-known/apple-$environment-merchantid-domain-association";
if (file_exists($associationFile)) {
if (!headers_sent()) {
ob_end_clean();
header('Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0');
header('X-Robots-Tag: noindex, nofollow');
header_remove('Last-Modified');
header('Content-Type: text/plain', true, 200);
}
echo file_get_contents($associationFile);
exit;
}
Expand Down

0 comments on commit a011a39

Please sign in to comment.