【发布时间】:2018-10-14 04:48:45
【问题描述】:
我在在线编辑器中创建了一个示例 SAPUI5 应用程序
Check this link to view my code
I am getting this below error -
> XMLHttpRequest cannot load
> http://services.odata.org/V2/Northwind/Northwind.svc/Products?$format=json.
> No 'Access-Control-Allow-Origin' header is present on the requested
> resource.
有人可以帮我解决这个问题吗?我知道这是 CORS 问题,可以通过禁用 chrome 中的安全性来解决。
但是 - 我不会禁用 chrome 的安全功能。那么,有没有其他方法(可能通过传递一些标头)来解决这个问题。
提前感谢您的帮助。
P.S.:我已经查看了这些链接 -
http://scn.sap.com/community/gateway/blog/2014/09/23/solve-cors-with-gateway-and-chrome
【问题讨论】:
标签: google-chrome cors odata sapui5