gnitnuj Posted July 9, 2014 Share Posted July 9, 2014 Hello! I am just wondering if there are any resources on how to get a Phaser game to load properly when all assets are hosted on a CDN. At this point all I've been able to find are crossOrigin and baseURL, and also bypassing the issues entirely by encoding the images in base64 as data. Thanks! Link to comment Share on other sites More sharing options...
Heppell08 Posted July 9, 2014 Share Posted July 9, 2014 Not sure about this sort of stuff but did find this: https://github.com/niftylettuce/express-cdn See if that is any help to your issue. Link to comment Share on other sites More sharing options...
Blank101 Posted July 10, 2014 Share Posted July 10, 2014 You can't get around CORS from the client side. You either need to proxy your assets through your own server (which defeats the point of the CDN) or setup CORS on your CDN. Which CDN provider are you using? Link to comment Share on other sites More sharing options...
clark Posted July 11, 2014 Share Posted July 11, 2014 Hmmm, I cannot tell you about the server because the guy is gone. But I am sure this solved it and it had nothing to do with the server (or atleast, we exhausted server options). //load the preloader stuffthis.load.crossOrigin = "Anonymous";this.load.image("background", "blah/background.png");OR If you are using chrome / canary for testing hit this extention to cancel out CORS. If that does not work, then for sure it has to do with the server.https://chrome.google.com/webstore/detail/allow-control-allow-origi/nlfbmbojpeacfghkpbjhddihlkkiljbi?hl=enNote that I have no idea what any of it means, but our CORS issue is gone and that is good for me Link to comment Share on other sites More sharing options...
Recommended Posts