dynamic websocket domain to client code