#How do you add a CSRF Token to a post request?y

1 messages · Page 1 of 1 (latest)

earnest egret
#

Sharing the csrf_token through props isn't really a good idea I believe, as that would invalidate the csrf token that's sent through cookies (which is what Laravel does by default)

north kraken
#

Why would this not be an easier thing Inertia provides?

earnest egret
#

Basically because it's a Laravel thing. Inertia doesn't set these csrf values for Axios either, Axios already takes care of it

north kraken