CORS Policy Error When Accessing DICOM Images in OHIF Viewer Embedded

Skip to first unread message

Anas Mehmood

Nov 29, 2023, 8:31:10 AM11/29/23
to cornerstone platform
I am encountering an issue with my Laravel application, where I have embedded the OHIF viewer using an iframe. The error I am facing is as follows:
Access to XMLHttpRequest at '' from origin 'http://localhost:3000' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.

I believe this issue is related to the Cross-Origin Resource Sharing (CORS) policy. Specifically, it seems that the required 'Access-Control-Allow-Origin' header is missing in the response to the preflight request.

I would appreciate any insights or guidance on how to address this CORS policy error in the context of embedding the OHIF viewer in a Laravel application and sending the path for DICOM images.

Ricardo Borjas

Nov 29, 2023, 8:54:12 AM11/29/23
to Anas Mehmood, cornerstone platform
Try enabling HTTPS instead of plain HTTP.
Besides, and localhost are treated as different domains and some rules apply. 
Try to use the same address or domain name, even if they are on the same physical server. 
Both your PACS server and your OHIF server must share the same protocol.

You received this message because you are subscribed to the Google Groups "cornerstone platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit

Ricardo Borjas
IT & Software Development Consultant
Reply all
Reply to author
0 new messages