xss-purge
v1.0.0
Published
Node.js Connect middleware to sanitize user input coming from POST body, GET queries, and url params.
Downloads
33
Maintainers
Readme
xss-purge
Node.js Connect middleware to sanitize user input coming from POST body, GET queries, and url params.
Usage
npm install xss-purge
With Express (JS)
const express = require('express');
const xssPurge = require('xss-purge');
const app = express();
app.use(xssPurge());
app.listen(5000)
This will sanitize any data in req.body, req.query, and req.params. You can also access the API directly if you don't want to use as middleware.