redactUrlCredentials
Ce contenu n’est pas encore disponible dans votre langue.
redactUrlCredentials(
value):string
Defined in: src/util/RedactUrlCredentials.ts:140
Replace the userinfo of every absolute URL in value with ***, leaving
the rest of the string byte-identical.
A no-op on anything without a scheme://…@ in it, so it is safe to apply to
a value that only might be a URL. The userinfo runs to the last @ before
the next :// on its line, so a password with an unescaped /, ? or #
in it is masked whole and the next line of a stack is left alone — see
lastAtBeforeNextUrl for that reading and its price. Every URL in
the string is covered, not just the first: a joined
server list (nats://a:b@h1,nats://c:d@h2 — see NatsActor) has each
entry masked, and the entries cannot bleed into one another because a
userinfo stops at the :// that opens the next one.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”string
