Detect 127.0.0.1 in js as local connection