CORS troubles
#1
Hi,

i have a Raspberry running OSMC and i would like to devlope a web app to control kodi but i'm facing some CORS troubles when i try to query the JSON-RPC api. I can perform an http query using Postman, howerver, when i try the same query in my application i get an error telling me that the CORS is not enabled on the server.

- I have enabled the option to allow computers of my network to query Kodi.
- my web application is based on AngularJs

Does sombody has an idea of what should i try to get my app working ?
Reply
#2
there is no support for CORS yet. As it's a potential security risk there was no consenus yet on how to handle it configuration wise. Also no dev had time to take a closer look yet. Sorry.

Further reading:
http://forum.kodi.tv/showthread.php?tid=184338
http://forum.kodi.tv/showthread.php?tid=174407
Reply
#3
One way around this would be to puth nginx as proxy on the raspberry and send CORS header with nginx
Code:
add_header 'Access-Control-Allow-Origin' '*';
Reply
#4
ok Sad, thanks for theses answers
Reply

Logout Mark Read Team Forum Stats Members Help
CORS troubles0