Skip to Content
Apr 08 at 02:10 PM

OpenAPI Servlow - CORS error on accessing from Browsers


Hi All,

I'm using SAP Data Intelligence v3.1 and DI Modeler for the below scenario.

I'm hosting a web server via the OpenAPI Servlow operator with swagger documented service definitions, and I am trying to consume the same via a reactJS UI application. And when I am trying to make REST requests, the browser triggers a pre flight check and an OPTIONS request is made to the Servlow server and I'm returned a "NO CORS Error"

I am currently going around it by two ways,

1. Using a proxy such as cors-anywhere (for local requests) and accessing the APIs exposed via Servlow

2. Using a chrome window with web security disabled (for accessing the React application when its deployed to a cloud).

But since these two cannot be viable fixes when going to production, is there any way to properly handle cross origin requests when exposing web services via the DI Modeler and the Servlow operator?