adonis.js

AdonisJS Error Code “EBADCSRFTOKEN” in Postman in PUT,POST,DELETE operation

不羁岁月 提交于 2019-12-06 07:23:55
I have created REST API in AdoniJs. In this I have created API endpoints for CRUD operations with GET, POST, PUT and DELETE menthods. I am using shieldjs as a middleware to verify CSRF token. I am making API calls from Postman. Firstly I am calling GET method of API and I am getting the expected data properly and 3 cookies as part of response, out of which, one is XSRF-TOKEN . But when I am calling PUT, POST and DELETE methods by setting key X-XSRF-TOKEN to the value of XSRF-TOKEN from the cookie in request header, I am getting error EBADCSRFTOKEN as response in Postman. Configuration of CSRF