Skip to Content
Nov 16, 2017 at 04:12 AM

SAPUI5 custom library hosted in SCP


Hi folks, let me try to find an answer here.

I built UI5 library with some custom controls. Built it and deployed it on SCP using full-stack WebIDE. I need to reuse this library in the other ui5 app as embedded. This other ui5 app is running in the different domain.

But it didn't work when the library is deployed on Cloud Platform. The reason is a cross-domain origin of the request to get this library. And the request to load my library is refused.

When the same library is deployed, let's say, into - all good and it's running well.

BTW, neo-app has authenticationMode as none.

If I had a complete app, I'd probably use frameOptions in bootstrap. Not sure. But it is mentioned in the documentation of SAPUI5. I didn't find how to deal with whitelisting for libraries.

So the question here is how to whitelist origins in the library hosted in SCP?

The error looks like attached. It says "No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin '...' is therefore not allowed access".


cors.png (39.9 kB)