node.js - Invalid CSRF Token via Postman -


i using csrf protection in mean-stack application csurf node.js module.

as long send post requests angular frontend web service, works fine. if try make post request via postman, i'll face:

"forbiddenerror: invalid csrf token"

according first answer how send spring csrf token postman rest client? token out of cookie login request , set every post request. requests working fine.

i configured follows:

app.use(csrf({cookie: {path: '/', httponly: true}})); app.use(function(req, res, next) {     let token = req.csrftoken();     res.cookie('xsrf-token', token);     res.locals.csrftoken = token;     next(); }); 

best regards,

tobias


Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

javascript - jQuery UI Splitter/Resizable for unlimited amount of columns -

javascript - IE9 error '$'is not defined -