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

Blocked By Cors #24

Open
bacink opened this issue May 20, 2023 · 2 comments
Open

Blocked By Cors #24

bacink opened this issue May 20, 2023 · 2 comments

Comments

@bacink
Copy link

bacink commented May 20, 2023

hy, thank u for your great jobs, iam pretty sure folowing intruction in readme file, but iam getting blocked cors i try'd edit .env in laravel, like SANCTUM_STATEFUL_DOMAINS but it still won't work, i use laravel 9 and nuxtjs 3 cookies based authentication
Screenshot from 2023-05-20 21-47-04

@kreejzak
Copy link
Collaborator

Hi @bacink,
have you put your frontend and backend url into the SESSION_DOMAINS and SANCTUM_STATEFUL_DOMAINS in the laravel .env file?

it should look something like this:

SESSION_DOMAINS=localhost,localhost:8000,localhost:3000,127.0.0.1,127.0.0.1:8000,::1
SANCTUM_STATEFUL_DOMAINS=localhost,localhost:8000,localhost:3000,127.0.0.1,127.0.0.1:8000,::1

In your case just add api.layanan.test,client.layanan.test, before the ::1 and it should probably work.

Hope it helps!

@bacink
Copy link
Author

bacink commented Jul 31, 2023

thank a lot, its works

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

2 participants