Cross-Origin Request / CORS header - Robot Web Services
                
                    Humphrey                
                
                     ✭                
            
                        
            I'm trying to run the example javascript client for the Robot Web Services REST API as found in the documentation:
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);<br>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?
            Tagged:
            
        
0  
            Comments
- 
            Oh, after posting I noticed some information in the documentation that I didn't see earlier because of some strange behaviour of the documentation site.
It states:- Create a folder named docs under the HOME folder on the controller.
 - Copy the html file to the HOME/docs folder
 - Enter the URL {controller ipaddr}/docs/HelloControllerHtml.html in a web browser. (Depending on your network; you migth need to disable the proxy in your web browser)
 - For a VC type the URL http://127.0.0.1/docs/HelloControllerHtml.html in the browser
 
So my new question is: is there some way to serve the code outside of the controller?
0 
Categories
- All Categories
 - 5.6K RobotStudio
 - 401 UpFeed
 - 21 Tutorials
 - 15 RobotApps
 - 306 PowerPacs
 - 407 RobotStudio S4
 - 1.8K Developer Tools
 - 250 ScreenMaker
 - 2.9K Robot Controller
 - 363 IRC5
 - 81 OmniCore
 - 8 RCS (Realistic Controller Simulation)
 - 853 RAPID Programming
 - 31 AppStudio
 - 4 RobotStudio AR Viewer
 - 19 Wizard Easy Programming
 - 110 Collaborative Robots
 - 5 Job listings