-
-
Notifications
You must be signed in to change notification settings - Fork 0
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
No 'Access-Control-Allow-Origin' #3
Comments
my quick solution if (static::isOriginAllowed($origin)) {
$originHeader = ($origin == '*')?$origin:($_SERVER['HTTP_ORIGIN'] ?? $_SERVER['HTTP_HOST']);
Headers::accessControl(
'Allow-Origin',
$originHeader
);
} |
Hi @webds, I'm just seeing this issue. Do you mean you are not able to set your own origins using |
hey! im having the same error, i dont know what to do to solve it |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://github.com/leafsphp/cors/blob/10934a7504879ecf9b6f7687926c22a3b5c02ce9/src/Cors.php#LL71C4-L71C4
There is an error here.
If we want to set a custom Allow-Origin, we won't be able to do it.
For example, if I want to set the value "*", it will still not be accepted. The AJAX request will throw an error:
...has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
The text was updated successfully, but these errors were encountered: