CloudFront Signer
Sign urls with canned or custom policy
Notice: Use aws-sdk library rather, this one was done before I knew about it, and inspired from aws-cloudfront-sign
// canned:const cfSign = ; const expire = Math; // expire in one dayconst url = 'http://xyz.cloudfront.net/test/cool?fun=1';const signedUrl = url + '&' +
// custom (allow wildcards):const cfSign = ; const expire = Math; // expire in one dayconst qs = // valid for 'http://xyz.cloudfront.net/test/test/bar?' + qs// valid for 'http://xyz.cloudfront.net/test/test/cool?fun=1&' + qs