Skip to content
This repository has been archived by the owner on Aug 5, 2024. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants