bapho Posted January 3, 2017 Share Posted January 3, 2017 Hi guys, Anyone here know of a way to block users coming from certain countries or IP ranges within just using JS/Phaser and preferably without using a server? I tried using http://freegeoip.net/ with xmlHttpRequest but that didn't pan out well due to anti cross domain rules. Link to comment Share on other sites More sharing options...
Penagwin Posted January 3, 2017 Share Posted January 3, 2017 This is an odd request as you normally block IPs from other countries from the server. If you are trying to prevent say Antartican Players from playing your game then you need to do that serverside, otherwise they still get the game (and can modify it). If this helps with your goal though... https://crossorigin.me Just make sure you set then origin header. Link to comment Share on other sites More sharing options...
samme Posted January 3, 2017 Share Posted January 3, 2017 Are you sure it's a cross-domain failure? freegeoip.net must allow cross-domain requests, that's the whole point of the API. Link to comment Share on other sites More sharing options...
Recommended Posts