node防xss攻擊插件

var xss = require('node-xss').clean;
router.post("/orders/insert-orders", function (req, res) {
//對請求體作xss過濾
var data = xss(req.body); var url = urlMap.englishlistenspeakserver + '/orders/insert-orders'; var options = { url: url, method: 'POST', json: true, qs: data }; request(options, function (error, response, body) { res.send(body); }) });
相關文章
相關標籤/搜索