I’m trying to run the example javascript client for the Robot Web Services REST API as found in the documentation:
http://developercenter.robotstudio.com/blobproxy/devcenter/Robot_Web_Services/html/_hello_controller_html_8html-example.html
I have changed the URL to the IP address of the controller:
rwServiceResource.open("GET","http://192.168.125.1/rw/system?json=1",true);
When opening the html file (from my laptop on my laptop, for development) I am getting an error in the javascript console:
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://192.168.125.1/rw/system?json=1. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).
How should I fix this? Why doesn’t the controller API give a CORS header? I can’t serve the html from the controller right?