Skip to content

Commit

Permalink
Enable immutable caching for S3 objects (mastodon#9722)
Browse files Browse the repository at this point in the history
I also added "public" here, as I can't think of a good reason not to add it. Perhaps it has some marginal benefit in that ISPs (or other proxies) can cache it for all users. The assets are certainly publicly available and the same for all users.
  • Loading branch information
nolanlawson committed Jan 11, 2019
1 parent 1fef670 commit ffb81a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion config/initializers/paperclip.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
s3_protocol: s3_protocol,
s3_host_name: s3_hostname,
s3_headers: {
'Cache-Control' => 'max-age=315576000',
'Cache-Control' => 'public, max-age=315576000, immutable',
},
s3_permissions: ENV.fetch('S3_PERMISSION') { 'public-read' },
s3_region: s3_region,
Expand Down

0 comments on commit ffb81a4

Please sign in to comment.