CDN77
URL signer for using secure urls on CDN77 (with optional expiration time)
Installation
npm install cdn77
Usage
Domain: Your CDN Domain
Secret: Your Secret Key
Secure: Optional. If true
, https will be used, otherwise http.
Example
var cdn77 = // replace with your resource url and your secret token// third parameter (true) tells library to generate https urlvar exampleSigner = // generate link for /images/photo.png that expires in 5 minutes// NOTE: we need to convert javascript timestamp from miliseconds to secondsvar now = Mathconsole