Proxy server could cache http response when it is not private

Signed-off-by: Clement Wong <git@clement.hk>
pull/20897/head
Clement Wong 6 years ago
parent 0eeb660679
commit 401210d259
  1. 4
      lib/public/AppFramework/Http/Response.php

@ -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();

Loading…
Cancel
Save