koa-content-filter

1.0.0 • Public • Published

Koa-content-filter

Build Status

A third-party middleware for Koa to prevent NoSQL injection.

This is a improved version from efkan's content-filter to adapt koa-ecosystem.So, you can find more infomations there.

Usage

const filter = require('koa-content-filter');

app.use(filter());

Then, if anyone send a request with blackblist(url or body) words like $ will recive :

{
    "status": 403,
    "code": "FORBIDDEN_CONTENT",
    "message": "A forbidden expression has been found in URL: $"
}

Package Sidebar

Install

npm i koa-content-filter

Weekly Downloads

0

Version

1.0.0

License

MIT

Last publish

Collaborators

  • kingcc