0

I need to resolve the same origin policy restriction in JavaScript client side SAPUI5 application that is consuming an OData service from a cross origin server. In SAP HANA developer guide one of the solutions to this problem is to enable CORS (Cross Origin Resources Sharing).

I tried to enable CORS following the instructions from the developer guide by adding the following configuration to the .xsaccess file:

 "cors": [{
    "enabled": true
}]

Yet CORS is not enabled! Is there any further configuration I should consider?

Thanks

Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48
Mohamed Ali JAMAOUI
  • 14,275
  • 14
  • 73
  • 117

1 Answers1

0

Add this parameter to your ajax-call and check:

xhrFields: {withCredentials: true}
Peanut
  • 3,753
  • 3
  • 31
  • 45
Shiva
  • 11
  • 1