I am making a custom lightning component in which i am rendering a React app using lightning:container
.
In that react app i have to make ajax calls to another domain api.xyz.com
to fetch and update the data.
Are these cross domain api calls possible somehow? Because the iframe in which lightning:container
renders the react app has its src set to something else.
I have looked over forums and documentation but unable to come to a conclusion. Please help. Any example will help.
api.xyz.com
domain as a CSP Trusted Site? Are you getting any particular errors in the browser's dev console? I'm also assuming that your react app is stored as a static resource on Salesforce and rendered from there.