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 committed by backportbot[bot]
parent c19d639231
commit 1331eb1fb8
1 changed files with 2 additions and 2 deletions

View File

@ -107,10 +107,10 @@ class Response {
*/ */
public function cacheFor(int $cacheSeconds) { public function cacheFor(int $cacheSeconds) {
if ($cacheSeconds > 0) { 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 // Old scool prama caching
$this->addHeader('Pragma', 'public'); $this->addHeader('Pragma', 'private');
// Set expires header // Set expires header
$expires = new \DateTime(); $expires = new \DateTime();