Newer Version Available

This content describes an older version of this product. View Latest

Perform Cross-Origin Requests from Web Browsers

Cross-Origin Resource Sharing (CORS) allows web browsers to request resources from other origins. For example, using CORS, the JavaScript for a web application at https://www.example.com can request a resource from https://www.salesforce.com. To allow access to supported Salesforce APIs, Apex REST resources, and Lightning Out from JavaScript code in a web browser, add the requesting origin to your Salesforce CORS allowlist.

For more information, see Perform Cross-Origin Requests from Web Browsers in Salesforce Help.