mirror of
https://github.com/LemmyNet/activitypub-federation-rust
synced 2024-11-10 06:04:19 +00:00
Change domain
to host_str
(#37)
This commit is contained in:
parent
9df5bd086f
commit
5181f15499
1 changed files with 1 additions and 1 deletions
|
@ -156,7 +156,7 @@ impl<T: Clone> FederationConfig<T> {
|
|||
/// Returns true if the url refers to this instance. Handles hostnames like `localhost:8540` for
|
||||
/// local debugging.
|
||||
pub(crate) fn is_local_url(&self, url: &Url) -> bool {
|
||||
let mut domain = url.domain().expect("id has domain").to_string();
|
||||
let mut domain = url.host_str().expect("id has domain").to_string();
|
||||
if let Some(port) = url.port() {
|
||||
domain = format!("{}:{}", domain, port);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue