normalizeServerURL canonicalizes a server URL for use as a credential key. Trailing slash and surrounding whitespace are stripped; nothing else is touched (no scheme normalization, no port-canonicalization — those are deliberate, since differently-spelled URLs may legitimately reach different server
(u string)
| 254 | // reach different servers). Mirrors normalizeURL in cmd/pad/server_info.go |
| 255 | // so the two stay consistent. |
| 256 | func normalizeServerURL(u string) string { |
| 257 | return strings.TrimRight(strings.TrimSpace(u), "/") |
| 258 | } |