CORS issue with the API

I’m having an issue with an API endpoint.

There are some demo data it’s supposed to fetch fetch and it seems to work from the other apps but not from the Appgyver. Any tips for this?


1 Like


If it’s working in other apps but not AppGyver, it seems to be a CORS issue. Are you able to change the server side header Access-Control-Allow-Origin?

How do you do this?

I don’t understand why two of my API services work with every other engine like but I can’t for the life of me get it to work with AppGyver…


Can you please test your API here: CORS Checker | Test a URL for valid CORS headers | ANYJSON

It should say “This URL will work correctly with CORS” for it to work in AppGyver.

There is also a very simple rule of thumb.
If your API endpoint requires setting any header value (like Authorization header or any other custom header) this will by design trigger a CORS flow in a browser.
Given the SAP Appgyver Composer Pro is browser based tool there is no much escape.
Reiterating after the SAP Appgyver documentation I do recommend using an API proxy instead. That will have an additional benefit of making your design way leaner and simpler and more secure after all.