You need to sign in to do that
Don't have an account?
Callie Tomlinson
Whitelisting an origin for CORS in salesforce.
No matter which domain I pass in, I cannot get it to work. How do I whitelist a domain for CORS in salesforce?
function readOnly(count){ }
You need to sign in to do that
Don't have an account?
You can whitelist domains for CORS by navigating to Setup > Security > CORS > New. Provide the url of the domain to be whitelisted in the following format - https://*.example.com and then click Save. This should help you whitelist the domain. Refer the snapshot below.
CORS basically means Cross Object Resource Sharing and is a security norm enforced, that permits Javascript running on a remote server only from whitelisted endpoints through CORS to communicate with Salesforce. Refer the following article on how to Use CORS to Access Supported Salesforce APIs, Apex REST, and Lightning Out (https://help.salesforce.com/articleView?id=extend_code_cors.htm&type=0) to get a better understanding around the same.
Please mark the thread as SOLVED and answer as the BEST ANSWER if it helps address your issue.
All Answers
You can whitelist domains for CORS by navigating to Setup > Security > CORS > New. Provide the url of the domain to be whitelisted in the following format - https://*.example.com and then click Save. This should help you whitelist the domain. Refer the snapshot below.
CORS basically means Cross Object Resource Sharing and is a security norm enforced, that permits Javascript running on a remote server only from whitelisted endpoints through CORS to communicate with Salesforce. Refer the following article on how to Use CORS to Access Supported Salesforce APIs, Apex REST, and Lightning Out (https://help.salesforce.com/articleView?id=extend_code_cors.htm&type=0) to get a better understanding around the same.
Please mark the thread as SOLVED and answer as the BEST ANSWER if it helps address your issue.
I used a php file in order to be able to deploy my static site to heroku (thought it would fix the CORS issue) and I still have not built the backend yet. So I cannot set specifc routes. I am wondering if i cannot read the subdomain?