koa-req

2.1.1 • Public • Published

koa-req

  Koa v2 request middleware for adding extra security and cors on koa requests.

Install

npm install koa-req

Usage

const Koa = require('koa');
const kreq = require('koa-req');
const app = new Koa();
kreq(app)

Options

corsEnabled - [Boolean] Default true helmetEnabled - [Boolean] Default true loggerEnabled - [Boolean] Default true cors - [Object] Contains options to pass to koa/cors helmet - [Object] Contains optiosn to pass to koa-helmet

/koa-req/

    Package Sidebar

    Install

    npm i koa-req

    Weekly Downloads

    2

    Version

    2.1.1

    License

    MIT

    Unpacked Size

    77.7 kB

    Total Files

    8

    Last publish

    Collaborators

    • unibtc