Cross domain problems with my WEB UI remote Control
Posted: 31 Mar 2016 18:42
Hello , I would like to create my own web interface to control VLC remotely via a web UI in javascript but when I send an XML HTTP request , I get this error:
" Response to preflight request Does not pass access control check: No ' Access -control - Allow- Origin . ' header is present on the requested resource Origin ' http: // localhost: . 8383 ' The Therefore is not allowed access HAD The response HTTP status code 501. "
Obviously there is a cross domain request problem, but I do not know how to deal with it with VLC.
I added this to my code but no results:
xhttp.open("GET", "http://localhost:8080/requests/status.xml?", true);
xhttp.setRequestHeader ("Authorization", "Basic " + btoa( ":" + "test"));
xhttp.setRequestHeader("Access-Control-Allow-Origin", "*");
xhttp is equals to an instance of XMLHttpRequest.
Can anyone help me?
Thank you
" Response to preflight request Does not pass access control check: No ' Access -control - Allow- Origin . ' header is present on the requested resource Origin ' http: // localhost: . 8383 ' The Therefore is not allowed access HAD The response HTTP status code 501. "
Obviously there is a cross domain request problem, but I do not know how to deal with it with VLC.
I added this to my code but no results:
xhttp.open("GET", "http://localhost:8080/requests/status.xml?", true);
xhttp.setRequestHeader ("Authorization", "Basic " + btoa( ":" + "test"));
xhttp.setRequestHeader("Access-Control-Allow-Origin", "*");
xhttp is equals to an instance of XMLHttpRequest.
Can anyone help me?
Thank you