mirror of
https://github.com/discourse/discourse.git
synced 2025-05-31 05:48:23 +08:00
FIX: S3 uploads were missing a cache-control header (#7902)
Admins still need to run the rake task to fix the files who where uploaded previously.
This commit is contained in:

committed by
GitHub

parent
4b9d35cd0e
commit
606c0ed14d
@ -43,6 +43,7 @@ module FileStore
|
||||
cache_file(file, File.basename(path)) if opts[:cache_locally]
|
||||
options = {
|
||||
acl: opts[:private] ? "private" : "public-read",
|
||||
cache_control: 'max-age=31556952, public, immutable',
|
||||
content_type: opts[:content_type].presence || MiniMime.lookup_by_filename(filename)&.content_type
|
||||
}
|
||||
# add a "content disposition" header for "attachments"
|
||||
|
Reference in New Issue
Block a user