1
0
mirror of https://github.com/oceanprotocol/docs.git synced 2024-11-26 19:49:26 +01:00

properly set cache headers

* turns out S3 does not allow modifying cache-control headers once they are set, resulting in our 2nd part of s3sync being ignored
* fix by explicetly excluding, and then including the respective files
This commit is contained in:
Matthias Kretschmann 2019-10-07 15:57:53 +02:00
parent 3518745bfe
commit 9e4a946d74
Signed by: m
GPG Key ID: 606EEEF3C479A91F

View File

@ -13,6 +13,15 @@ set -e;
function s3sync {
aws s3 sync ./public s3://"$1" \
--include "*" \
--exclude "*.html" \
--exclude "sw.js" \
--exclude "*page-data.json" \
--exclude "chunk-map.json" \
--exclude "sitemap.xml" \
--exclude ".iconstats.json" \
--exclude "humans.txt" \
--exclude "robots.txt" \
--cache-control public,max-age=31536000,immutable \
--delete \
--acl public-read
@ -21,9 +30,11 @@ function s3sync {
--exclude "*" \
--include "*.html" \
--include "sw.js" \
--include "*page-data.json" \
--include "chunk-map.json" \
--include "sitemap.xml" \
--include ".iconstats.json" \
--include "humans.txt" \
--include "robots.txt" \
--cache-control public,max-age=0,must-revalidate \
--delete \