function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Prasobh V 4Prasobh V 4 

No 'Access-Control-Allow-Origin' header is present on the requested resource.

Hi All,

I am trying to load a .stl file on visualforce page by embedding JS based .stl viewer.
.stl file is actually located in AWS S3. And when I try to access it, I am getting below error.
XMLHttpRequest cannot load No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin '' is therefore not allowed access.

Will enabling CORS at the server side will solve the issue? Is there any other way to solve this issue?
Is there any security issues on doing the same which can affect my security review while I publish app?
ShashankShashank (Salesforce Developers) 
Please see if this helps:
Talha SaqibTalha Saqib
Please try the following resource: