-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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 when trying to use the API #524
Comments
Have you tested on the latest version of Chrome? We are aware that the CORS issue you reported has been occurring since the recent Chrome security update. Thanks. |
I did, other browsers, updated versions.. still same error |
@omarruben To add one explanation, the recent Chrome update has caused CORS errors for non-HTTPS URLs in certain situations. |
As mentioned in previous issues about the API not supporting CORS: imho this is a feature, not a bug. Webclients should never query that API. Instead, you should put some proxy or relay in between which handles authentication/authorization using some temporary json web token or similar. Otherwise it is a) very easy to overload your server using DoS, b) very easy to get the API token which the webclient uses to query the API. However, the documentation so far does not mention this, which probably leads to many users of OME using it in an insecure way... |
thank you, how I can use push video from OvenMediaEngine to ... Youtube using RTMP without using the API? , some configuration file?? |
You can use the API, but at least put an Nginx reverse proxy or similar in front of that admin web interface, which handles user authentication. You can then have Nginx set the necessary header using something like |
@omarruben |
I reopened this task to close when it was confirmed that the problem was solved. |
I'm closing this issue because it has been inactive for a long time since it was resolved. Please reopen this issue for further discussion. |
How do you solve the error of being blocked by CORS POLICY ..........this is the error (Access to fetch at 'https://saavn.dev/api/songs' from origin 'http://127.0.0.1:5500/' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: It does not have HTTP ok status. |
Hi, i have the server under 192.168.1.190, did all configurations and working perfect
I am trying to use PUSH features, but I need the API working... I did.
when I call using AXIOS from other computer on the same network:
axios.post(http://192.168.1.190:8081/v1/vhosts/default/apps/app:pushes, {
title: "test",
description: "description",
},
{
headers: {
'Content-Type': 'application/json',
authorization :"Basic "+ btoa("urbano14")
}
}
).then(function (response){
console.log(response);
}).catch(function (error){
console.log(error);
I got CORS error , "Access-Control-Allow-Origin’ missing" , where or how do I configure this on the server.xml?
thank you for your help...
The text was updated successfully, but these errors were encountered: