I'm aware of whitelisting domains for CORS from Setup->Security->CORS, but I'm currently developing an application locally and am encountering the lack of the 'Access-Control-Allow-Origin' header in a ReST API POST response (the "pre-flight" OPTIONS response has this header). The POST request succeeds, but the response is blocked due to CORS restrictions.
I cannot add the localhost hostname to the whitelist of my sandbox org. I'm wondering if anyone has an idea of how to get around this during development without setting up a proxy inside a valid domain?
1 resposta
HI Nicholas,Recommend reviewing similar posts:https://salesforce.stackexchange.com/questions/310334/cors-error-when-calling-sf-rest-api-from-localhosthttps://salesforce.stackexchange.com/questions/70052/why-is-cors-localhost-whitelist-not-working-for-authenticationIf this information helps, please mark the answer as best. Thank you