fallback to locahost if the wifi is not available

If the wifi is not available (airplane mode) the web server will not return the URL. 

My app uses your server as a proxy, so it needs to communicate with the server also when the wi-fi is not available. This fix will make the server to fallback to localhost.