on 10-28-2015 9:39 AM
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
I've solved my issue by enable CORS in XS admin.
Best regards,
Binh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I'm going to : http://xxx.xxx.xxx.xx:8000/sap/hana/xs/admin/#/package/sap
and select CORS tab. In the end of page, you will see a EDIT button which you can enable "Enable Cross Origin Resource Sharing" function.
Best regards,
Binh
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.