WebGL and Access-Control-Allow-Origin

Hi all, i’m New in Unity and WebGL.

I have this problem, when i Use WWW class for get a JSON or a simple Image:

WWW wwwBase = new WWW(url);

And then export to WebGL i receive this error:

XMLHttpRequest cannot load - No ‘Access-Control-Allow-Origin’ header is present on the requested resource

What can I do?

sorry for my english.-

If the url you are trying to access differs from the url where your game is hosted, you’ll need cross-origin resource sharing. Maybe read-up on this here: