Today invoking REST APIS from Visualforce or Lightning requires proxying them through a server side controller written in Apex, which is not the most modern of programming languages.

Is it possible to bypass security policies so that client-side controllers could invoke a REST API external to Salesforce domain?


I initially had missunderstood your question, sry.

Is it possible to bypass security policies - If yes, that means there would be a flaw or bug in the architecture.

So, no, it is not possible. In Lightning, your static resource has to be Locker service compliant, in visualforce, you have to meet the security requirements imposed in your salesforce org (and general saleforce requirements)

| improve this answer | |
  • No chance that in Visualforce I can work-around the CORS settings provided by Salesforce? – Edmondo1984 Feb 16 '18 at 16:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.