Symptom
When execute a HTTP fetch or XHRHttpRequest to retrieve SAP OData Provisiong Service in SAP Cloud Platform Neo environment, the following CORS(Cross-Origin-Resource-Sharing) error may happen:
Access to fetch at 'https://gwaas-subaccount.tenant.hana.ondemand.com/odata/ODPServiceName' from origin 'https://RemoteAjaxCall.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
Or
Access to XMLHttpRequest at 'https://gwaas-subaccount.tenant.hana.ondemand.com/odata/ODPServiceName' from origin 'https://RemoteAjaxCall.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
Read more...
Environment
- SAP API Management
- SAP Cloud Platform Neo OData Provisioning
Product
Keywords
OData Provisioning, SAP Cloud Platform Neo, gwaas, Gateway Service, CORS, Cross Origin Resource Sharing, same origin policy,Access-Control-Allow-Origin, API Management,BTP(Business Technology Platform) , KBA , OPU-GW-OD , On Demand , OPU-API-OD-DT , Designtime , How To
About this page
This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP for Me (Login required).Search for additional results
Visit SAP Support Portal's SAP Notes and KBA Search.
SAP Knowledge Base Article - Preview