Skip to content
This repository has been archived by the owner on Nov 30, 2022. It is now read-only.

419 status #20

Closed
nithinnitzarya opened this issue Apr 23, 2018 · 4 comments
Closed

419 status #20

nithinnitzarya opened this issue Apr 23, 2018 · 4 comments
Labels
invalid Invalid to the repository (not a code issue, etc)

Comments

@nithinnitzarya
Copy link

I tried to post form data from shopify to my laravel app using jquery ajax. but it is showing 419 status.

@gnikyt
Copy link
Owner

gnikyt commented Apr 23, 2018

Don't think this is an issue with the package.

Its probably from CRSF token missing when you do the post request. Google "419 AJAX Laravel" for more information.

Essentially, you'll need that route run through the api group instead of the standard web group OR you'll need to append the CSRF token in with your POST request.

You probably need the ladder... check out this for example implementations.

@gnikyt gnikyt added the invalid Invalid to the repository (not a code issue, etc) label Apr 24, 2018
@nithinnitzarya
Copy link
Author

I excluded the path from the csrf validation and it worked fine.

@gnikyt
Copy link
Owner

gnikyt commented Apr 25, 2018

Awesome :)

@gnikyt gnikyt closed this as completed Apr 25, 2018
@darrynten
Copy link
Contributor

@nithinnitzarya instead of excluding it from the csrf validation you should add the csrf token to your requests.

It's as simple as adding the @csrf tag in your form on the blaze template.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
invalid Invalid to the repository (not a code issue, etc)
Projects
None yet
Development

No branches or pull requests

3 participants