From 0185b03da51d903fa121014a455c5edc09644641 Mon Sep 17 00:00:00 2001 From: Arda Kilicdagi Date: Mon, 26 Dec 2016 02:43:32 +0300 Subject: [PATCH] Cache headers added --- app/Photo.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/Photo.php b/app/Photo.php index 05974ac..6ee458b 100644 --- a/app/Photo.php +++ b/app/Photo.php @@ -123,7 +123,13 @@ public static function upload(UploadedFile $file) [ 'StorageClass' => config('whatthetag.s3_storage_class', 'STANDARD'), // https://github.com/thephpleague/flysystem-aws-s3-v3/blob/dc56a8faf3aff0841f9eae04b6af94a50657896c/src/AwsS3Adapter.php#L387 + + // Set visibility to public 'ACL' => 'public-read', + + //Let's add a year for cache headers: + 'CacheControl' => 'max-age=31536000, public', + 'Expires' => gmdate("D, d M Y H:i:s", time() + 31536000) . " GMT", ] );