You need to sign in to do that
Don't have an account?

Cross-Origin Request errors while referencing static resource in lightning component
I unable load my lightning component in a ligtning app page due to Cross-Origin Request error . I'm getting below mentioned error in the console
Font from origin 'https://xxx-dev-ed.my.salesforce.com' has been blocked from loading by Cross-Origin Resource Sharing policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://xxx-dev-ed.lightning.force.com' is therefore not allowed access. The response had HTTP status code 404.
So can any one please suggest me the right answer to fix this issue..
Font from origin 'https://xxx-dev-ed.my.salesforce.com' has been blocked from loading by Cross-Origin Resource Sharing policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://xxx-dev-ed.lightning.force.com' is therefore not allowed access. The response had HTTP status code 404.
So can any one please suggest me the right answer to fix this issue..
Please post how you are referring it in lightning.
Thanks
i refer as below......
<ltng:require styles="/resource/bootstrapcss,/resource/font" scripts='/resource/jqury,/resource/boostrapjs'/>
The script uses ltng:require to include javascript in a static resource, we've CORS whitelisted https://*.force.com and https://*.salesforce.com, but still get the error:
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.
We've been scouring the forums but haven't seen anything that addresses this issue.
Thanks