1

I am trying to use flow in my local as mentioned here

This is how the code looks like: enter image description here

And I'm getting this CORS issue: Access to XMLHttpRequest at 'https://casesrnd-dev-ed.lightning.force.com//runtime_appointmentbooking/Guest_Flow/undefined.app?aura.format=JSON&aura.formatAdapter=LIGHTNING_OUT' from origin 'http://localhost:3001' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

Any help would be highly appreciated

  • I did tried with Community URL as mentioned in the document and faced CORS issue even there – Ali Apr 12 at 9:49
  • You can Try adding "localhost:3001" to your CORS setting in salesforce from Setup->CORS also put http before it – User6670 Apr 12 at 12:56
1

Answer is pretty simple and it was so stupid of me. I can't white list localhost.

I simply deployed this to Heroku and white listed the Heroku URL and bang. It worked like charm.

| improve this answer | |

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.