在我的 nodejs 服务器中防止 xhr 攻击 [英] Preventing xhr attack in my nodejs server

查看:33
本文介绍了在我的 nodejs 服务器中防止 xhr 攻击的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个 nodejs 服务器,它将与客户端移动应用程序进行交互.我在服务器上遇到了一些称为 XSS 和 XHR 的攻击.我遇到了一个名为 node-validator 的模块,它对处理和验证输入很有用.我需要知道 XSS 和 XHR 攻击是否具有相同的效果,以及该模块是否对两者都有用.关于此的任何想法都会非常有帮助.

I am developing a nodejs server which will be interacting with a client mobile application.I came across some attacks on the server called as XSS and XHR.I came across a module called node-validator which was useful for handling and validating inputs.I need an idea whether XSS and XHR attacks have the same effect and if that module is useful for both.Any idea regarding this will be really helpful.

推荐答案

如果你使用 expressjs/connect 那么有一个内置"连接中的 csrf 中间件.

If you are using expressjs/connect then there's a "built-in" csrf middleware in connect.

这篇关于在我的 nodejs 服务器中防止 xhr 攻击的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆