0.2.0 • Published 10 years ago

koa-xframe v0.2.0

Weekly downloads
10
License
MIT
Repository
github
Last release
10 years ago

Koa XFrame

NPM version build status Test coverage David deps npm download

X-Frame-Options HTTP response header utility for Koa.

Installation

$ npm install --save koa-xframe

Usage & API

import Koa from 'koa';
import xFrame from 'koa-xframe';

const app = new Koa();

// default settings -> set X-Frame-Options to 'DENY'
app.use(xFrame());

// custom settings
// -> set X-Frame-Options to 'DENY'
app.use(xFrame('DENY'));
// -> set X-Frame-Options to 'SAMEORIGIN'
app.use(xFrame('SAMEORIGIN'));

Credits

Inspired by Koala headers.js middleware.

License

MIT

0.2.0

10 years ago

0.1.4

10 years ago

0.1.3

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago