xrs
xss-req-sanitizer
npm i xss-req-sanitizer
xrs

xss-req-sanitizer

Middleware to sanitize http requests

by Narendra Kalekar

1.0.2 (see all)License:MITTypeScript:Not FoundCategories:Express XSS, Express XSS Sanitizer
npm i xss-req-sanitizer
Readme

xss-req-sanitizer

Build Status Coverage Status

xss-req-sanitizer is a middleware to sanitize http requests to prevent XSS attacks.

Installation

npm install xss-req-sanitizer

How to use ?

var express = require('express')
var bodyParser = require('body-parser')
var xssReqSanitizer = require('xss-req-sanitizer')

var app = express()

app.use(bodyParser.json())

// this should comes before any routes
app.use(xssReqSanitizer())

app.post('/your-route', (req, res) => {

   // All the values from,
   // req.body, req.params, req.query 
   // will be sanitized in-place.

})

Testing & Contributing

npm install
npm test

License

MIT

Downloads/wk

3

GitHub Stars

0
No data available

LAST COMMIT

NaNyrs ago

MAINTAINERS

1

CONTRIBUTORS

0

OPEN ISSUES

0

OPEN PRs

0
No data available
VersionTagPublished
1.0.2
latest
1yr ago
No tutorials found
Add a tutorial