Changes the protocol to https if not on localhost