🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

cloudfront-signer

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cloudfront-signer

Sign urls for AWS CloudFront

4.1.0
latest
Source
npm
Version published
Weekly downloads
25
-78.07%
Maintainers
1
Weekly downloads
 
Created
Source

CloudFront Signer Build Status

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 = require('cloudfront-signer');

const expire = Math.floor((Date.now()+86400e3)*0.001); // expire in one day
const url = 'http://xyz.cloudfront.net/test/cool?fun=1';
const signedUrl = url + '&' + cfSign(url, expire, cfKeypairId, cfPrivateKey)
// custom (allow wildcards):
const cfSign = require('cloudfront-signer');

const expire = Math.floor((Date.now()+86400e3)*0.001); // expire in one day
const qs = cfSign('http://xyz.cloudfront.net/test/*', expire, cfKeypairId, cfPrivateKey)
// valid for 'http://xyz.cloudfront.net/test/test/bar?' + qs
// valid for 'http://xyz.cloudfront.net/test/test/cool?fun=1&' + qs

Keywords

AWS

FAQs

Package last updated on 10 Aug 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts