Quantcast
Channel: SCN : All Content - SAP Gateway
Viewing all articles
Browse latest Browse all 2823

CORS Issue While Consuming ODATA from Gateway Hub

$
0
0

Hi

 

We have developed the odata service and trying to use it in the non sap custom application but we are getting error Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource (Reason: CORS header 'Access-Control-Allow-Origin' missing)

We are on ECC 6.0 EHP7 and using the Separate Gateway Hub. We are using MSSQL as database. As mentioned in some of the post have also tried setting up the header in the server side in the service:

DATA: ls TYPE ihttpnvp.

     ls-name = 'Access-Control-Allow-Origin'.

     ls-value = '*'.

     CALL METHOD super->/iwbep/if_mgw_conv_srv_runtime~set_header

       EXPORTING

         is_header = ls.


But still getting the error. Application that is calling the ODATA is residing at the localhost.


Appreciate your responses. Let me know in case further information is required.


Regards,

Rohit


Viewing all articles
Browse latest Browse all 2823

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>