CORS issue of SAP CX OData API on AppGyver

Hi,

I think I can do the SAP Cx OData API test, but there’s an issue. (Green box)
It is said that it works on Mobile, but it may not work when deployed as a CORS issue.

Please tell me how to solve this CORS issue. Thank you.

Hi Sumi,

There’s a good thread about CORS and SAP services here How to Solve CORS Issues with SAP API Management :slight_smile:

1 Like

Unfortunately C4C does not allow CORS out of the box so you need to use a proxy.

I have created an idea for it: https://influence.sap.com/sap/ino/#/idea/277034

@Sumi_Kang you should hide the domain and the username from screenshot.
Additionally using a regular user will require CSRF token validation each time you make a POST request so I’d suggest creating a technical user. It is also safer.

Hi Atakan, APIM is a very good approach but do you know it’s price? :slight_smile:

Hi Sumi, for development you can use Chrome with CORS disabled. Just create the shortcut like that “C:\Program Files\Google\Chrome\Application\chrome.exe” --disable-web-security --disable-gpu --user-data-dir=C:\Temp

BR,
Anton

I’m not very acquainted with the licensing models but I think the Integration Suite (CPI+APIM) comes within SAP Cloud for Customer license. But that’s something SAP should clarify say for sure.

If you’re not developing in SAP Environment, you could create proxies with many different tools such as Apigee, etc.