WebGL problem - no response from WWW class

Can’t seem to get a response from WWW class with WebGL running in a browser.

The code is as simple as possible:

void Start () {
    StartCoroutine ("testURL");
}

public IEnumerator testURL()
    {
        Debug.Log("testURL started");
        WWW www = new WWW (baseURL);
        yield return www;
       
        if (www.error == null)
        {
            Debug.Log("success");
        }
        else
        {
            Debug.LogError(www.error);
        }
    }

I have another component displaying everything that gets logged. The last entry is “testURL started”, so that method never executes past the yield return; The server that baseURL refers to, logs the request as successful (status 200).

The same code works in WebPlayer and when targetting WebGL, but running in Editor. I have Enable Exceptions set to Full in PlayerSettings.

What else can I try?

Found the problem. Its actually documented here: Unity - Manual: WebGL networking

Solved it with enable cross-origin resource sharing