food-lookup-demo
food-lookup-demo copied to clipboard
CSRF token missing
Hi;
I used your tutorial as a start point and I successfully created an app and managed to get data with fetch
My problem is that I used krakenjs
as my nodejs backend and it has default security rules set. I don't want to disable CSRF but when I try to do a POST request with fetch I get CSRF Token missing
error.
I couldn't find a solution with doing some google search. I tried to save 'x-csrf-token' header on localStorage and post it back when I make a fetch POST but then I got CSRF Token mismatch
error.
I would really appreciate any help or suggestions. Thank You