Add cache-control to CarrierWave when using S3 (#10115)
This commit is contained in:
parent
54c071856e
commit
6771217e6c
1 changed files with 1 additions and 0 deletions
|
|
@ -35,6 +35,7 @@ CarrierWave.configure do |config|
|
|||
aws_secret_access_key: ApplicationConfig["AWS_SECRET"],
|
||||
region: region
|
||||
}
|
||||
config.fog_attributes = { cache_control: "public, max-age=#{365.days.to_i}" }
|
||||
else
|
||||
# Fallback on file storage if AWS creds are not present
|
||||
config.asset_host = "https://#{ApplicationConfig['APP_DOMAIN']}/images"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue