Skip to main content
We're getting an "Access-Control-Allow-Origin" error when we try to include JS libraries in a lightning flow component.

We've CORS whitelisted the following:

And referenced the static resources containing the js code via $Resource in a ltng:require component:

 

<ltng:require styles="" scripts="{!join(',','/resource/evt__JQuery/jquery-3.2.1.min.js',$Resource.EventManagement + '/moment/moment.js',$Resource.TimezonePicker+'/timezone-picker.js')}" afterScriptsLoaded="{!c.afterJSLoaded}" />

But the platform still thinks we have a CORS problem:

 

Failed to load https://linvioevents-dev-ed.my.salesforce.com/visualforce/session?url=https%3A%2F%2Flinvioevents-dev-ed--evt.na7.visual.force.com%2Fresource%2Fevt__JQuery%2Fjquery-3.2.1.min.js: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access.

Has anyone else run into this?  Is there a fix/work-around?

Thanks
1 risposta
0/9000