redactedUrlLabel
redactedUrlLabel(
value):string
Defined in: src/util/RedactUrlCredentials.ts:94
The loggable identity of value: scheme, host, port and path, with the
userinfo and the query string removed.
Keeping the path matters — it is what tells two connections to the same
host apart (/ws/orders vs /ws/audit), so reducing to the origin alone
would trade away the whole diagnostic value of the line. The query is
dropped rather than kept for the same reason the userinfo is: a WebSocket
endpoint is commonly authenticated with a ?token=….
Unlike redactUrlCredentials this normalises (the parse is a real
URL parse), which is fine for a label but not for echoing back what an
operator typed. An unparseable value falls back to a userinfo-masked,
query-stripped copy of the input, so the function is total.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”string
