Search Unity

New Boss Approaches: Access-Control-Allow-Origin!

Discussion in 'Multiplayer' started by DevMerlin, Apr 24, 2015.

  1. DevMerlin

    DevMerlin

    Joined:
    Dec 21, 2011
    Posts:
    96
    So I have a WebGL game mainly ready to go, and working in the editor and connecting. However, when I load it from the site, I run headfirst into a Access Control Allow issue. It fails to connect and throws a couple errors at me from the browser - in this case, Chrome, but Firefox and others seem to be doing the same thing.

    The problem is this:
    Refused to set unsafe header "host"

    When that error pops up the game itself doesn't stop working but won't connect, and then it tells me this:

    XMLHttpRequest cannot load https://api.playerio.com/api/13. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://www.teonnyn.com' is therefore not allowed access.

    Has anyone encountered something like this before? This issue has stalled the game's development.