Skip to Content
0
Sep 10, 2020 at 08:53 PM

CORS Add Allowed Origin in SAP Gateway Backend for OAuth TOken Request

137 Views

In my web application(non-fiori) I am attempting to request an OAuth token from SAP Gateway using the SAP Gateway endpoint https://[server].[domain].com:[port]/sap/bc/sec/oauth2/token from my http://localhost:3000/ origin. How can I go into the SAP Gateway Backend and make SAP trust requests from http://localhost:3000/? How can I solve this CORS(cross-origin resource sharing) issue?

My Gateway server is not in the cloud it is on-premise. And I have already retrieved the SAML Bearer assertion and everything else needed to make the OAuth request.