Fixed remote host problem in main.js

Fix remote host issue. 

Replaced local host with the location property and added config for specific hosts. 

I have tested via external ip on Opera, IE, Firefox & Chrome. However couldn't really test it for another domain than graphhopper.com.