Do not let caches keep queued or hidden images.

This commit is contained in:
tim
2026-09-26 15:27:51 +02:00
parent 3df88e0b4c
commit fe30a0aaa1
3 changed files with 16 additions and 3 deletions
+7
View File
@@ -84,6 +84,13 @@ class FeedAndImageTest extends PageTestCase {
$this->assertSame(200, $this->get('/display?id=9&queue=1')['status']);
}
public function testRestrictedImagesAreNotCached(): void {
$this->assertNull($this->header($this->get('/display?id=2'), 'Cache-Control'));
$this->loginAs();
$this->assertSame('private, no-store', $this->header($this->get('/display?id=3'), 'Cache-Control'));
$this->assertSame('private, no-store', $this->header($this->get('/display?id=9&queue=1'), 'Cache-Control'));
}
public function testThePendingUploadIsShownToItsSession(): void {
$name = bin2hex(random_bytes(16));
mkdir(self::$state . '/tmp/uploads', 0700);