修改 - 关闭 debug CSRF

This commit is contained in:
suwings 2018-04-20 13:05:14 +08:00
parent 8f4331db33
commit f636c82124

View File

@ -15,7 +15,7 @@ function getRandToken() {
router.get('/', function (req, res) {
let username = req.session['username'] || undefined;
//ajax 会受到浏览器跨域限制姑不能对其进行csrf攻击获取token尽管它可伪造。
if (req.xhr || true) {
if (req.xhr) {
if (!req.session['token']) {
MCSERVER.log('[ Token ]', '用户 ', username, ' 请求更新令牌');
//强化 token