Pass headers to s3-sync to be able to set metadata in objects

s3-sync has the ability to receive headers as arguments and pass them to
AWS S3 as metadata headers. This modification proposes to set headers at
configuration so they are written in the objects when deploying.

Main motivation is to be able to pass CacheControl header and have
Cache-Control set for objects ovoiding "Leverage Browser Caching"
throwed by page speed analyzers.

Attention: Metadata are written equal to all objects (files) stored to
S3 and there is no way to tailor it by file type at this moment.

Signed-off-by: Josenivaldo Benito Jr <jrbenito@benito.qsl.br>
This commit is contained in:
Josenivaldo Benito Jr
2016-06-14 13:40:08 -03:00
parent d50a2e75c3
commit 7d675f69c7
3 changed files with 32 additions and 6 deletions

View File

@@ -18,6 +18,10 @@
{
"name": "Jack Guy",
"email": "jack@thatguyjackguy.com"
},
{
"name": "Josenivaldo Benito Jr.",
"email": "jrbenito@benito.qsl.br"
}
],
"repository": {
@@ -32,6 +36,7 @@
},
"dependencies": {
"chalk": "^1.1.1",
"s3": "^4.4.0"
"s3": "^4.4.0",
"xtend": "^4.0.1"
}
}