Jump to content

How to get around CORS in Phaser when all assets are hosted on a CDN?


gnitnuj
 Share

Recommended Posts

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

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=en

Note that I have no idea what any of it means, but our CORS issue is gone and that is good for me :P

 
Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...