koa-check-origin
A koa middleware that checks if the origin matches the given base URL. If not a HTTP 403 is thrown.
Installation 🏗
koa-check-origin
requires Node.js >= v7.6.0
because Koa needs that as well.
$ npm install --save koa-check-origin
or if you use Yarn 🐈
$ yarn add koa-check-origin
Usage 🔨
const createCheckOriginMiddleware = ; const app = ; const checkOriginMiddleware = ;app;