cancel
Showing results for 
Search instead for 
Did you mean: 

No 'Access-Control-Allow-Origin' header is present on the requested resource.

0 Kudos

We try to create an app which uses Netweaver OData services. When we test the application we get the error:

No 'Access-Control-Allow-Origin' header is present on the requested resource.

I have searched on SDN and found a couple of solutions. However these solutions are too short (more like hints) and don't give the answers from the beginning to the end. I was not yet able to fix the problem.

Is there a complete solution available which describes the proper solution?

Regards, Paul Lauwers.

Application Engineer

IFF

Accepted Solutions (0)

Answers (2)

Answers (2)

naveenraj_a
Active Participant
0 Kudos

Hi Paul,

You are getting this error in browser, because of the famously known "Same Origin Policy" security restrictions in browsers.

There are nemours solutions avaible for this, based on your enviroment,

1. Configuring Reverse proxy using Apache server,

2. Simple solution, which i use frequently for testing SAPUI applications, (which is restricted to Chrome browser and only for testing environment)

In Windows-- create a Chrome shortcut on your desktop.

Right-click - properties - Shortcut

Edit "target" path : (for eg)

"C:\Program Files\Google\Chrome\Application\chrome.exe" --args --disable-web-security

Thanks

Naveenraj.A

kammaje_cis
Active Contributor
0 Kudos

Paul, this is called as "Same Origin Policy".

There are several ways to get around and here is a blog listing them well.

0 Kudos

Thank you for your reply. If I choose for option 3.1 ICF-Bases services, whant are the exact steps to perform? I did go to SICF and found the service. How do I create the new handler class?