How do I generate CSRF tokens in Express?

后端 未结 4 1288
北海茫月
北海茫月 2021-02-03 13:25

newbie. I\'m using ExpressJS/Node. Here\'s my config stuff:

var express = require(\'express\'),
app = express.createServer(),
jade=require(\'jade\');
// Configu         


        
4条回答
  •  遥遥无期
    2021-02-03 14:06

    Dynamic helpers has been removed from Express since 3.x.

    The new usage would be app.use(express.csrf());, which comes from Connect.

提交回复
热议问题