xteve-project / xTeVe

M3U Proxy for Plex DVR and Emby Live TV
MIT License
1.86k stars 237 forks source link

Api not working #353

Open fmartinezsolano opened 1 year ago

fmartinezsolano commented 1 year ago

Hi,

Sorry for my English.

I have activated the API interface to be able to update my m3u list automatically.

For this I have created a small html page with an ajax call to cmd update.m3u but I always get an answer with the error has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

Does anyone know why it happens?

I put the code of the ajax call:

function xteve() { $.ajax({ method: "POST", url: "http://xxx.xxx.x.x:34400/api/", data: { cmd: "update.m3u" }, success: function(response) { console.log(response); }, error: function(request, error_string, exception) { console.log("request failed: " + error_string); } }); }

Thanks!