visionmedia/node-s3-policy — pull request #1 by TooTallNate (2014-01-10 23:46:35+00:00)
Title: Add "conditions" optional Array option, for predefined custom S3 Policy "conditions"

Can be used to add _other_ "conditions". For example, to allow the `Cache-Control` header to be passed in, then you would do something like:

``` js
var policy = require('s3-policy');

var p = policy({
secret: 'something',
bucket: 'i.cloudup.com',
key: 'asdfasdfaewrw',
acl: 'public-read',
conditions: [
['starts-with', '$Cache-Control', '']
]
});
```

Future thoughts: we could potentially add a `headers` Object option, which would streamline the above logic, however the list of allowed headers is very small, so it might not be worth it.