Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Proxy server could cache http response when it is not private
Signed-off-by: Clement Wong <[email protected]>
  • Loading branch information
kklem0 authored and backportbot[bot] committed May 13, 2020
commit 1331eb1fb8a93f9d5d809918dfc8bf06506371a2
4 changes: 2 additions & 2 deletions lib/public/AppFramework/Http/Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,10 @@ public function __construct() {
*/
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();
Expand Down