Parse the current location to generate the correct WebSocket URI.