Vereda
    Preparing search index...

    Function redactUrl

    • 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.

      Parameters

      • url: string

      Returns string