CORS error for PlayCanvas assets hosted on s3


I have hosted my assets on S3 and modified index.html and __settings… file as per the instructions given in Hosting using a CDN .

I have hosted the index.html in another server and when I run the index file, I am getting below errors. I currently have no permission to access my s3 bucket settings, am I missing somethings here.

I have attached image below showing the errors I get when I run index page of PlayCanvas package.

As I looked more into the topic I found out that I have to include ’ crossorigin=“use-credentials” ’ attribute in link tag for manifest.json file in index page. And had no difference when I added it in my file.

Ps: I have other assets hosted in s3 and they are fetched with no errors in my other server. Having the above mentioned issue only with PlayCanvas package.

Thank you

The error for __moduels__.js is odd as it looks like your server is just rejecting the request. Not sure what would cause that tbh and you will need to investigate on the hosting end to ensure that it is accessible.

Regarding the CORS errors, it looks like Cloud front is not set up to allow requests from outside the cloudfront domain.

Going to the cloudfront URL is fine

This looks like a setup issue with CloudFront being accessed from your main page domain name at the moment.

Hello @yaustar ,

Thank you for pointing out the issue. I will check with my CloudFront configurations and reply in chain if my issue is resolve.

Best regards