Normalize a server URL for comparison: lowercased, no trailing slash.
(url: &str)
| 390 | |
| 391 | /// Normalize a server URL for comparison: lowercased, no trailing slash. |
| 392 | fn normalize_server_url(url: &str) -> String { |
| 393 | url.trim().trim_end_matches('/').to_lowercase() |
| 394 | } |
| 395 | |
| 396 | /// An empty pattern list is unrestricted; otherwise the value must match one. |
| 397 | fn matches_any(patterns: &[String], value: &str) -> bool { |