Proxy server could cache http response when it is not private

Signed-off-by: Clement Wong <git@clement.hk>
This commit is contained in:
Clement Wong 2020-05-10 11:06:56 +02:00
parent 0eeb660679
commit 401210d259
1 changed files with 2 additions and 2 deletions

View File

@ -107,10 +107,10 @@ class Response {
*/
public function cacheFor(int $cacheSeconds) {
if ($cacheSeconds > 0) {
$this->addHeader('Cache-Control', 'max-age=' . $cacheSeconds . ', must-revalidate');
$this->addHeader('Cache-Control', 'private, max-age=' . $cacheSeconds . ', must-revalidate');
// Old scool prama caching
$this->addHeader('Pragma', 'public');
$this->addHeader('Pragma', 'private');
// Set expires header
$expires = new \DateTime();