Access to XMLHttpRequest has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource

vipinviswa

New member
The spot editor published assets are hosted on AWS cloudfront.
The html file to load the player is dynamically generated based. The player loading script is as shows below
<script language="javascript" type="text/javascript">

jQuery(document).ready(function(){

jQuery('#wr360PlayerId').rotator({
licenseFileURL: 'license.lic',
configFileURL: '<aws cloudfront distribution url>/360_assets/TestProject/TestProject.xml',
graphicsPath: '<aws cloudfront distribution url>/imagerotator/html/img/basic',
alt: '360 degree view - NewProject1',
googleEventTracking: false,
});
});

A blank page is displayed and the following error reported
Access to XMLHttpRequest at "<aws cloudfront distribution url>/360_assets/TestProject/TestProject.xml" from origin "http://localhost:59290" has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
 
Top