# cdn77

> URL signer for using secure urls on CDN77

Latest version **1.1.0** (published 2016-03-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install cdn77
pnpm add cdn77
yarn add cdn77
bun add cdn77
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2016-03-30 |
| First published | 2014-07-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Marek Hrabe |
| Maintainers | marekhrabe |

## Links

- npm: https://www.npmjs.com/package/cdn77
- Repository: http://github.com/marekhrabe/cdn77
- Homepage: https://github.com/marekhrabe/cdn77
- Issues: http://github.com/marekhrabe/cdn77/issues
- npm.io page: https://npm.io/package/cdn77

## Recent versions

- 1.1.0 (latest) — 2016-03-30
- 1.0.0 — 2014-07-12

## README

# CDN77

URL signer for using secure urls on CDN77 (with optional expiration time)

## Installation

```
npm install cdn77
```

## Usage

```javascript
cdn77(domain, secret, secure)
```

Domain: Your CDN Domain
Secret: Your Secret Key
Secure: Optional. If `true`, https will be used, otherwise http.

## Example

```javascript
var cdn77 = require('cdn77')

// replace with your resource url and your secret token
// third parameter (true) tells library to generate https url
var exampleSigner = cdn77('www.example.com', 'ykX1QNTRvp3tfSn8', true)

// generate link for /images/photo.png that expires in 5 minutes
// NOTE: we need to convert javascript timestamp from miliseconds to seconds
var now = Math.floor(new Date / 1000)
console.log(exampleSigner('/images/photo.png', now + 5 * 60))
```

---
_Source: https://npm.io/package/cdn77 · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
