When running locally with .example.com domain use http
This commit is contained in:
parent
83286b7522
commit
ad3ea0e7ca
1 changed files with 1 additions and 1 deletions
|
@ -14,7 +14,7 @@ pub fn get_hostname(url: &str) -> Result<String, ParseError> {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn guess_protocol(hostname: &str) -> &'static str {
|
pub fn guess_protocol(hostname: &str) -> &'static str {
|
||||||
if hostname == "localhost" {
|
if hostname == "localhost" || hostname.ends_with(".example.com") {
|
||||||
return "http";
|
return "http";
|
||||||
};
|
};
|
||||||
let maybe_ipv4_address = hostname.parse::<Ipv4Addr>();
|
let maybe_ipv4_address = hostname.parse::<Ipv4Addr>();
|
||||||
|
|
Loading…
Reference in a new issue