Redacts the secret-bearing parts of a URL for safe logging: userinfo credentials become [redacted]@, and each query parameter value becomes [redacted] while its key is preserved.
[redacted]@
[redacted]
Example: https://bob:hunter2@api.example.com/auth?token=abc123&user=joe → https://[redacted]@api.example.com/auth?token=[redacted]&user=[redacted]
https://bob:hunter2@api.example.com/auth?token=abc123&user=joe
https://[redacted]@api.example.com/auth?token=[redacted]&user=[redacted]
URLs with neither are returned unchanged.
Redacts the secret-bearing parts of a URL for safe logging: userinfo credentials become
[redacted]@, and each query parameter value becomes[redacted]while its key is preserved.Example:
https://bob:hunter2@api.example.com/auth?token=abc123&user=joe→https://[redacted]@api.example.com/auth?token=[redacted]&user=[redacted]URLs with neither are returned unchanged.