Quantcast
Channel: CNode:Node.js专业中文社区
Viewing all articles
Browse latest Browse all 14821

koa2中csrf的Invalid CSRF token错误,该如何排查?

$
0
0

app.js // session app.use(session(app)); // csrf app.use(new csrf()); // usage app.use(async (ctx, next) => { await ctx.render(‘home/index’, { title: ‘home page’, content: ‘this is home page’, csrf: ctx.csrf }); });

在表单页面中有值,但一提前就报Invalid CSRF token错误,该从哪些方面找原因?


Viewing all articles
Browse latest Browse all 14821

Trending Articles