aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs
diff options
context:
space:
mode:
authorMax Kostikov <max@kostikov.co>2019-04-17 23:15:46 +0200
committerMax Kostikov <max@kostikov.co>2019-04-17 23:15:46 +0200
commit1732b2dfe367e9e81bdfe1663383229f78f15572 (patch)
tree116861713fa7da282af0a9ad163fd1182173ba7e /Zotlabs
parenta62f891a60fff0fd7e0a3f625524ed3277290e58 (diff)
downloadvolse-hubzilla-1732b2dfe367e9e81bdfe1663383229f78f15572.tar.gz
volse-hubzilla-1732b2dfe367e9e81bdfe1663383229f78f15572.tar.bz2
volse-hubzilla-1732b2dfe367e9e81bdfe1663383229f78f15572.zip
Add 'must-revalidate' to Cache-control header for profile photos
Diffstat (limited to 'Zotlabs')
-rw-r--r--Zotlabs/Module/Photo.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/Zotlabs/Module/Photo.php b/Zotlabs/Module/Photo.php
index 37dfa03e4..832edb6fe 100644
--- a/Zotlabs/Module/Photo.php
+++ b/Zotlabs/Module/Photo.php
@@ -41,6 +41,7 @@ class Photo extends \Zotlabs\Web\Controller {
$observer_xchan = get_observer_hash();
$ismodified = $_SERVER['HTTP_IF_MODIFIED_SINCE'];
+ $cachecontrol = '';
if(isset($type)) {
@@ -104,6 +105,8 @@ class Photo extends \Zotlabs\Web\Controller {
$data = ($x['success'] ? $x['body'] : EMPTY_STR);
$mimetype = 'image/png';
}
+
+ $cachecontrol = ', must-revalidate';
}
else {
@@ -263,7 +266,7 @@ class Photo extends \Zotlabs\Web\Controller {
$maxage = $expires - time();
header("Expires: " . gmdate("D, d M Y H:i:s", $expires) . " GMT");
- header("Cache-Control: max-age=" . $maxage);
+ header("Cache-Control: max-age=" . $maxage . $cachecontrol);
}