0.5.1 • Published 6 years ago

koa-feature-policy v0.5.1

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

koa-feature-policy

Deprecated

Feature-Policy has been added to Helmet, so please use koa-helmet to add this header (and lots of other great security header fixes) to your Koa apps.


Small library for adding a Feature-Policy to Koa responses.

IMPORTANT Feature-Policy is experimental, so this library might change frequently until the new header is stable.


Installation

npm i koa-feature-policy

Usage

import featurePolicy from 'koa-feature-policy'

// set up koa

const options = {
  /* directive: allowlist */
  vibrate: ["'self'", 'https://example.com']
}

app.use(featurePolicy(options))

// call app.listen

See MDN for the full list of directives.

This library converts camelCase directives to lisp-case. So use ambientLightSensor, not 'ambient-light-sensor'.

License

MIT

0.5.1

6 years ago

0.5.0

6 years ago

0.4.1

6 years ago

0.4.0

6 years ago

0.3.2

6 years ago

0.3.1

6 years ago

0.3.0

6 years ago

0.2.0

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago