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??
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.
Most helpful comment
If it's an API endpoint, it's better to disable to the CSRF protection inside the config file