Sign in to follow this  
gnitnuj

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

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!

Share this post


Link to post
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

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.