mirror of
https://github.com/nextcloud/server.git
synced 2026-04-05 00:56:16 -04:00
Add no-store to AppFramework
This commit is contained in:
parent
15ba2a4100
commit
34f5541088
3 changed files with 3 additions and 4 deletions
|
|
@ -209,8 +209,7 @@ class AvatarController extends Controller {
|
|||
|
||||
$resp = new DataDisplayResponse($image->data(),
|
||||
Http::STATUS_OK,
|
||||
['Content-Type' => $image->mimeType(),
|
||||
'Pragma' => 'public']);
|
||||
['Content-Type' => $image->mimeType()]);
|
||||
|
||||
$resp->setETag(crc32($image->data()));
|
||||
$resp->cacheFor(0);
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ class Response {
|
|||
$this->addHeader('Cache-Control', 'max-age=' . $cacheSeconds .
|
||||
', must-revalidate');
|
||||
} else {
|
||||
$this->addHeader('Cache-Control', 'no-cache, must-revalidate');
|
||||
$this->addHeader('Cache-Control', 'no-cache, no-store, must-revalidate');
|
||||
}
|
||||
|
||||
return $this;
|
||||
|
|
|
|||
|
|
@ -221,7 +221,7 @@ class ResponseTest extends \Test\TestCase {
|
|||
$this->childResponse->cacheFor(0);
|
||||
|
||||
$headers = $this->childResponse->getHeaders();
|
||||
$this->assertEquals('no-cache, must-revalidate', $headers['Cache-Control']);
|
||||
$this->assertEquals('no-cache, no-store, must-revalidate', $headers['Cache-Control']);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue