express-auto-sanitize:Express中间件可自动清理用户输入

时间:2024-06-05 16:17:30
【文件属性】:

文件名称:express-auto-sanitize:Express中间件可自动清理用户输入

文件大小:85KB

文件格式:ZIP

更新时间:2024-06-05 16:17:30

JavaScript

安装 npm i --save express-auto-sanitize 用法 导入模块,并在文件顶部添加以下声明: const sanitizer = require ( 'express-auto-sanitize' ) 挂载中间件 const options = { query : Boolean , body : Boolean , cookies : Boolean , original : Boolean , // will keep the original version in req.original sanitizerFunction : Function // use your personnal sanitizing algorithm } app . use ( sanitizer ( options ) )


【文件预览】:
express-auto-sanitize-master
----.gitignore(27B)
----README.md(1KB)
----test()
--------fixtures()
--------express-auto-sanitize.js(3KB)
----LICENSE(1KB)
----.eslintrc(223B)
----package.json(1KB)
----index.js(56B)
----.npmignore(65B)
----lib()
--------express-auto-sanitize.js(1KB)
----banner.jpg(73KB)
----package-lock.json(83KB)

网友评论