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, 2020 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, 2020 at 12:56

1 Answer 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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .