Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

laravel 9 - problem with CSRF TOKEN #72

Open
marvofmay opened this issue Oct 23, 2022 · 3 comments
Open

laravel 9 - problem with CSRF TOKEN #72

marvofmay opened this issue Oct 23, 2022 · 3 comments

Comments

@marvofmay
Copy link

marvofmay commented Oct 23, 2022

Hi.
I've got problem on start.
When I run example test, I've got:
Screenshot_2

The request we sent was:

Method: GET
URL: http://127.0.0.1:8000/cypress/csrf_token
Headers: {
"Connection": "keep-alive",
"user-agent": "Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36",
"accept": "/",
"accept-encoding": "gzip, deflate"
}

What should I do ?

@marvofmay
Copy link
Author

ok, the command "php artisan optimize" fixed problem

@siubie
Copy link

siubie commented Jan 19, 2023

Hi I also have this problem and i solve it by adding app key to the .env.cypress file
notes : i have 2 .env files one for cypress and other for development

@fylzero
Copy link

fylzero commented Mar 12, 2023

Also have bumped into this problem a number of times and I have tried the suggestions above and have been trying to solve this for an absurd amount of time. Please help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants