Core: Error when I trying to store a info

Created on 21 Dec 2016  路  8Comments  路  Source: adonisjs/core

I have a resourceful controller. Everything works fine when I use GET method, but when I want to store a new data I get an error that says: Error (403) host and origin mis-match.

I use Postman to test my API so I think this is the problem. What is happening??

Most helpful comment

If it's an API endpoint, it's better to disable to the CSRF protection inside the config file

All 8 comments

You need to send csrf token when making post request

@thetutlage thanks for your reply! how can I do this?

@thetutlage sure, I read this but I'm using a tool to test my API, I'm not using a form

Also, When I'm using React, how can I access to this token to send it to my API?

If it's an API endpoint, it's better to disable to the CSRF protection inside the config file

Closing, since not actionable and seems to be working fine

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ghost picture ghost  路  3Comments

PC-HUB picture PC-HUB  路  4Comments

aligoren picture aligoren  路  4Comments

codingphasedotcom picture codingphasedotcom  路  3Comments

itsg2jakhmola picture itsg2jakhmola  路  3Comments