Added configurable rate limiter

This commit is contained in:
Ara Sadoyan
2025-07-09 15:01:20 +02:00
parent d0e4b52ce6
commit 8463cdabbc
10 changed files with 66 additions and 10 deletions

View File

@@ -91,7 +91,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.to_owned() {
if s.to_owned() == st.master_key {
if let Some(serverlist) = crate::utils::parceyaml::load_configuration(content.as_str(), "content") {
st.config_sender.send(serverlist).await.unwrap();
return Response::builder().status(StatusCode::OK).body(Body::from("Config, conf file, updated !\n")).unwrap();