S3 uploads and Cache-Control


(David) #1

I’m aware that S3 setups for upload are not really recommended anymore vs origin pull CDNs, but I have a fairly old installation and I’ve been worried at how Discourse handles Cache control rules for S3 uploads.

So far I’ve noticed that Etag/last-modified headers are set properly, but no Cache-Control header is set for S3 uploads. Since the official nginx setup uses Cache-control rules for avatar/uploads, it would help a lot to have S3 uploads use the same set of parameters. S3 does not let me set global HTTP headers, so it has to be done from the discourse app.


#2

Similar question- since now S3 is supported again, can S3 uploads by default have a cache-control metadata set for more effective control of S3 costs? Thanks.