Some structural changes and improvements

This commit is contained in:
Ara Sadoyan
2025-07-12 16:17:45 +02:00
parent f91bc41103
commit 51c88c8f7c
8 changed files with 141 additions and 55 deletions

View File

@@ -89,9 +89,15 @@ pub fn load_configuration(d: &str, kind: &str) -> Option<Configuration> {
for server in path_config.servers {
if let Some((ip, port_str)) = server.split_once(':') {
if let Ok(port) = port_str.parse::<u16>() {
// let to_https = matches!(path_config.to_https, Some(true));
let to_https = path_config.to_https.unwrap_or(false);
server_list.push((ip.to_string(), port, true, false, to_https));
let sl = InnerMap {
address: ip.to_string(),
port: port,
is_ssl: true,
is_http2: false,
to_https: to_https,
};
server_list.push(sl);
}
}
}