Skip to content

Commit

Permalink
Fix sending cache-control header (#121)
Browse files Browse the repository at this point in the history
* Fix sending cache-control header

* Update donate.php
  • Loading branch information
paladox committed Sep 16, 2023
1 parent fb72168 commit 72a762c
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
12 changes: 11 additions & 1 deletion donate.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<?php require_once __DIR__ . '/config.php'; ?>
<?php require_once __DIR__ . '/getTranslations.php'; ?>

<?php header('Cache-Control: max-age=300, must-revalidate'); ?>
<?php
ob_start();
?>

<!DOCTYPE html>
<html lang="<?php echo getLanguageCode(); ?>" prefix="og: http://ogp.me/ns#">
Expand Down Expand Up @@ -60,3 +62,11 @@ function _amountInput( ele ) {
<noscript><p><img src="https://matomo.miraheze.org/matomo.php?idsite=4657&amp;rec=1&amp;action_name=Landing_Donate" style="border: 0;" alt="Matomo" /></p></noscript>
</body>
</html>

<?php
header('Cache-control: max-age=300, must-revalidate');
?>

<?php
ob_flush();
?>
14 changes: 12 additions & 2 deletions index.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<?php
ob_start();
?>

<?php require_once __DIR__ . '/config.php'; ?>
<?php require_once __DIR__ . '/getTranslations.php'; ?>

<?php header('Cache-Control: max-age=300, must-revalidate'); ?>

<!DOCTYPE html>
<html lang="<?php echo getLanguageCode(); ?>" prefix="og: http://ogp.me/ns#">
<?php include_once __DIR__ . '/components/head.php'; ?>
Expand Down Expand Up @@ -108,3 +110,11 @@
<noscript><p><img src="https://matomo.miraheze.org/matomo.php?idsite=4657&amp;rec=1&amp;action_name=Landing_Home" style="border:0;" alt="Matomo" /></p></noscript>
</body>
</html>

<?php
header('Cache-control: max-age=300, must-revalidate');
?>

<?php
ob_flush();
?>

0 comments on commit 72a762c

Please sign in to comment.