Skip to content

Commit

Permalink
Cache headers added
Browse files Browse the repository at this point in the history
  • Loading branch information
Ardakilic committed Dec 25, 2016
1 parent 7c781c5 commit 0185b03
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/Photo.php
Original file line number Diff line number Diff line change
Expand Up @@ -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",
]
);

Expand Down

0 comments on commit 0185b03

Please sign in to comment.