mirror of
https://github.com/sadoyan/aralez.git
synced 2026-06-26 09:13:16 +08:00
Optimized healthchecks and config file loading
This commit is contained in:
@@ -45,6 +45,7 @@ impl GetHost for LB {
|
||||
}
|
||||
}
|
||||
}
|
||||
// println!("Best Match :===> {:?}", best_match);
|
||||
best_match
|
||||
}
|
||||
fn get_header(&self, peer: &str, path: &str) -> Option<Vec<(String, String)>> {
|
||||
|
||||
@@ -92,7 +92,7 @@ async fn conf(State(mut st): State<AppState>, Query(params): Query<HashMap<Strin
|
||||
|
||||
if let Some(s) = params.get("key") {
|
||||
if s.to_owned() == st.master_key {
|
||||
if let Some(serverlist) = crate::utils::parceyaml::load_configuration(content.as_str(), "content") {
|
||||
if let Some(serverlist) = crate::utils::parceyaml::load_configuration(content.as_str(), "content").await {
|
||||
st.config_sender.send(serverlist).await.unwrap();
|
||||
return Response::builder().status(StatusCode::OK).body(Body::from("Config, conf file, updated !\n")).unwrap();
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user