fiorix/freegeoip — Issue #4: Allow x-domain request
Author: aagahi
Created: 2012-02-23 20:10:08+00:00
State: open

Hi,

It would be nice if you could add response header from your web server to allow cross domain script json request.
Simply add:
Access-Control-Allow-Origin: *

And it will avoid this error message:
XMLHttpRequest cannot load http://freegeoip.net/json/. Origin http://localhost is not allowed by Access-Control-Allow-Origin.

More on cross-site HTTP requests: https://developer.mozilla.org/en/http_access_control

ty