Function: rehostSocketUrl()
rehostSocketUrl(
webSocketDebuggerUrl,browserUrl):string
Defined in: packages/aiui-util/src/socket-url.ts:10
Re-host a Chrome DevTools websocket URL onto the endpoint that answered.
Chrome reports its browser socket as ws://127.0.0.1:<its own port>/…, which is a lie from anywhere but that machine — a tunneled remote browser (packages/aiui/docs/remote) is reached at the forwarded host:port we just fetched from. Keep the path (the browser's session id) and take the authority from the endpoint that answered.
Parameters
webSocketDebuggerUrl
string
browserUrl
string
Returns
string