Skip to content

Commit 19807c7

Browse files
authored
Merge pull request #36 from backstagephp/markvaneijk-patch-1
add no-cache headers to image response
2 parents 84837f2 + d7fdd27 commit 19807c7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/OgImage.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,9 @@ public function getResponse(Request $request): Response
217217
OgImage::saveImage($html, $request->signature);
218218

219219
return response(OgImage::getStorageImageFileData($request->signature), 200, [
220+
'Cache-Control' => 'no-store, no-cache, must-revalidate, max-age=0, post-check=0, pre-check=0',
220221
'Content-Type' => OgImage::getImageMimeType(),
222+
'Pragma' => 'no-cache',
221223
]);
222224
}
223225

0 commit comments

Comments
 (0)