Skip to content

Commit 6018975

Browse files
nikhilsinhaparseableEshanatnight
authored andcommitted
fix to check scheme for hostname
1 parent 8c43ae1 commit 6018975

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

server/src/utils.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -247,10 +247,11 @@ pub fn get_address() -> Url {
247247
if hostname.starts_with('$') {
248248
let var_hostname = hostname[1..].to_string();
249249
hostname = get_from_env(&var_hostname);
250-
if !hostname.starts_with("http") {
251-
hostname = format!("{}://{}", CONFIG.parseable.get_scheme(), hostname);
252-
}
253250
}
251+
if !hostname.starts_with("http") {
252+
hostname = format!("{}://{}", CONFIG.parseable.get_scheme(), hostname);
253+
}
254+
254255
if port.starts_with('$') {
255256
let var_port = port[1..].to_string();
256257
port = get_from_env(&var_port);

0 commit comments

Comments
 (0)