diff options
author | Nolan Lawson <nolan@nolanlawson.com> | 2019-01-05 09:29:53 -0800 |
---|---|---|
committer | nightpool <nightpool@users.noreply.github.com> | 2019-01-05 12:29:53 -0500 |
commit | f05eb6708172c170598fe916357f057ab2791fd8 (patch) | |
tree | 2d2a6d2c8af5b1190f5d7cb89f914541b612a24b /config/initializers | |
parent | a49d43d1121ac10f96d5a9cbf78112c707e7a59e (diff) |
Enable immutable caching for S3 objects (#9722)
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.
Diffstat (limited to 'config/initializers')
-rw-r--r-- | config/initializers/paperclip.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/config/initializers/paperclip.rb b/config/initializers/paperclip.rb index df0205879..4bbf8b827 100644 --- a/config/initializers/paperclip.rb +++ b/config/initializers/paperclip.rb @@ -25,7 +25,7 @@ if ENV['S3_ENABLED'] == 'true' 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, |