CORS access to resources

How would I set up cross domain access to allow me to host assets on my own server but access them when developing from within the PlayCanvas IDE, so build is on Playcanvas but the data on my server

I have tried .htaccess

Header always set Access-Control-Allow-Origin “https://launch.playcanvas.com/*

But it does not work

Header always set Access-Control-Allow-Origin “*”

works but is of course insecure

Hi @rleinfellner,

Not sure what’s the issue, it seems correct, though I would try to list only the base domain like this, without the asterisk:

Header always set Access-Control-Allow-Origin “https://launch.playcanvas.com”

The following site has many resources on how to successfully enable CORS support:

https://enable-cors.org/

1 Like