2

I am using https://github.com/sahat/hackathon-starter#recommended-design-resources and trying to add post method and send a response as json. I am getting Error: CSRF token missing.

I want to use the Lusca and just wondering if there is a way to just add csrf token without doing whitelist/backlist url or using a form. Please take a look at app.js https://github.com/sahat/hackathon-starter/blob/master/app.js

exports.postTest = (req, res) => {
//tried the following.
//res.local = {_crf:"_crf"} no success
res.send("hello");
};

There must be a way to deal with this kind of issues.

Dee
  • 53
  • 7

0 Answers0