Whether `remote_host` is the server host itself or a subdomain of it, matching only on dot boundaries (so `notatomic.storage` does NOT match `atomic.storage`). Comparison is case-insensitive (DNS is).
(remote_host: &str, server_host: &str)
| 134 | /// matching only on dot boundaries (so `notatomic.storage` does NOT match |
| 135 | /// `atomic.storage`). Comparison is case-insensitive (DNS is). |
| 136 | fn host_is_under(remote_host: &str, server_host: &str) -> bool { |
| 137 | let remote = remote_host.to_ascii_lowercase(); |
| 138 | let server = server_host.to_ascii_lowercase(); |
| 139 | remote == server || remote.ends_with(&format!(".{server}")) |
| 140 | } |
| 141 | |
| 142 | /// Load a local identity by name, falling back to a case-insensitive match. |
| 143 | /// |
no outgoing calls
no test coverage detected