octopress/deploy — pull request #25 by awinder (2014-04-10 03:10:18+00:00)
Title: Add configuration for S3 file headers

These changes allow for adding a "headers" key to the YAML configuration that has the following sort of parameters:

```
headers:
- filename: '^assets.*\.js$'
expires: '+3 years'
cache_control: 'max-age=94608000'
content_type: 'application/javascript'
- filename: '^assets.*\.css$'
expires: '+3 years'
cache_control: 'max-age=94608000'
content_type: 'text/css'
- filename: '^assets.*\.js\.gz$'
expires: 'Sun, 5 Apr 2016 01:39:00 GMT'
cache_control: 'max-age=94608000'
content_type: 'application/javascript'
content_encoding: 'gzip'
- filename: 'assets/mainblog.css.gz'
expires: 'Sun, 5 Apr 2016 01:39:00 GMT'
cache_control: 'max-age=94608000'
content_type: 'text/css'
content_encoding: 'gzip'
```

That is to say, headers is an array of config objects that specify:
* Filename, as a regex or a substring of the file to match
* expires, as either an http date or as a relative number of years from the present time
* cache_control, content_type, and content_encoding as strings which are passed through

Hope this makes sense!