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

Cors error with Laravel inertia requests #367

Open
Deniz073 opened this issue Feb 8, 2023 · 2 comments
Open

Cors error with Laravel inertia requests #367

Deniz073 opened this issue Feb 8, 2023 · 2 comments

Comments

@Deniz073
Copy link

Deniz073 commented Feb 8, 2023

I am using Laravel with Inertia and React for my frontend. When using expose and doing a get/delete/post request using inertia's router im getting the following error in the console: Access to XMLHttpRequest at 'http://127.0.0.1:8000/news?search=te' from origin 'https://12700.eu-1.sharedwithexpose.com' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.

When accessing my application normally from localhost it works perfectly fine.

Also, when using expose's http url i am greeted with a blank screen and the following error:

Access to script at 'http://127.0.0.1:5173/@react-refresh' from origin 'http://12700.eu-1.sharedwithexpose.com' has been blocked by CORS policy: The request client is not a secure context and the resource is in more-private address space local.

@slaynn
Copy link

slaynn commented Aug 31, 2023

did you find a solution? I'm facing the same problem

@Deniz073
Copy link
Author

Deniz073 commented Sep 12, 2023

did you find a solution? I'm facing the same problem

No, switched to ngrok

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