Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://xxx.xxx:8000' is therefore not allowed access

Hi,

I'm trying write a XS application.

when using sapui5, I've included scripts below:

<script id="sap-ui-bootstrap" type="text/javascript"   

   src="http://abc.com:8001/sap/ui5/1/resources/sap-ui-core.js 

    data-sap-ui-language="en"

    data-sap-ui-libs="sap.ui.commons,sap.ui.ux3,sap.ui.table,sap.ui.richtexteditor"

    data-sap-ui-theme="sap_goldreflection"

    >

If the src is "https://sapui5.netweaver.ondemand.com/resources/sap-ui-core.js" => The app worked OK.

But when I'm try to change src to another server (2nd local XS server) ex:  src="http://abc.com:8001/sap/ui5/1/resources/sap-ui-core.js

The below error is happened:

XMLHttpRequest cannot load http://abc.com:8001/sap/ui5/1/resources/sap/ui/table/library-preload.json. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://xxx.xxx:8000' is therefore not allowed access

So, I guess, I must config in the 2nd XSserver to accept request from 1st server but I don't know how can I config it. Could you please help?

Thanks and best regards,

Binh

Tags:
Former Member
Not what you were looking for? View more on this topic or Ask a question