I am developing a little proof-of-concept web app which is supposed to send a GET request to a server (SAP ABAP system). The server provides ODATA REST Services. When I just paste the Services' URI's in the browser's adress bar, the desired content is displayed immediately. But when I try to make the request via the webapp (using jQuery for AJAX), a CORS-related problem occurs:
No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:XXXXX' is therefore not allowed access. The response had HTTP status code 401.
My code and further problems I am having with the HTTP Request can be found in this post. I do not understand why requests from just the browser (or fiddler) seem to work without problems but as soon as I send the request from the app (which is hosted locally btw), the CORS problem occurs. And FYI I have no access to server-side code, so there is no possibility of editing the "Access-Control-Allow-Origin" section.