Thinkofname / ThinkMap

A 3D web based mapviewer for Minecraft/Bukkit
http://www.spigotmc.org/resources/thinkmap.413/
Apache License 2.0
62 stars 15 forks source link

Does not render on Safari on OS X #91

Closed CraftedFury closed 10 years ago

CraftedFury commented 10 years ago

The following error appears a few hundred times when trying to view the map in Safari on OS X:

[Error] Failed to load resource: the server responded with a status of 403 (Forbidden) (chunk, line 0)
[Error] Failed to load resource: Origin http://thinkofdeath.co.uk is not allowed by Access-Control-Allow-Origin. (chunk, line 0)
[Error] XMLHttpRequest cannot load http://thinkofdeath.co.uk:23333/chunk. Origin http://thinkofdeath.co.uk is not allowed by Access-Control-Allow-Origin. (mapviewer, line 0)

However, if the map is viewed directly on port 23333, it renders properly.

deathcap commented 10 years ago

http://thinkofdeath.co.uk:23333/chunk is responding with 403 Forbidden to the OPTIONS request:

curl http://thinkofdeath.co.uk:23333/chunk --request OPTIONS -i HTTP/1.1 403 Forbidden Content-Length: 13

403 Forbidden

Not sure why Chrome doesn't seem to send OPTIONS, goes straight to POST(?). http://stackoverflow.com/questions/8153832/xmlhttprequest-changes-post-to-option explains:

Your server needs to allow the OPTIONS request and send a response with Access-Control-Allow-Origin, Access-Control-Allow-Headers and Access-Control-Allow-Methods headers allowing the request. Then the browser will make the actual POST request.

Thinkofname commented 10 years ago

Could you test using http://thinkofdeath.co.uk/mapviewerdev/ and report back if it actually fixed the issue

CraftedFury commented 10 years ago

The map does generate on mapviewerdev on my Safari on Mac, but (not sure if these are bugs, or just because of that specific dev version):

Thinkofname commented 10 years ago

@Brian-Graham Yep those are all features that haven't been re-added since the Haxe -> GWT conversion.