Skip to content

CORS fixing on local development with Laravel valet #109

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

madebyaris
Copy link

On the local development that uses something like Laravel Valet,

When we run npm run dev, the JavaScript is likely being rejected by the browser due to the different domain and port, so it will display a blank page.

We only allow CORS on the development, on the ' build npm build process, it will not allow the script to use CORS.

madebyaris added 3 commits May 1, 2025 08:00
Fixing the CORS issue when we run `npm run dev`
Only allow CORS when we run `npm run dev`, other than that it will not allow CORS
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

Successfully merging this pull request may close these issues.

1 participant