Reorginized config

This commit is contained in:
int 80h
2020-05-19 14:25:16 -04:00
parent 0cc3f8205e
commit 41d3447b83
4 changed files with 54 additions and 87 deletions

View File

@@ -32,11 +32,14 @@ pub async fn cgi(
envs.insert("QUERY_STRING", q);
}
if srv.cgienv.len() != 0 {
for (k, v) in srv.cgienv.iter() {
envs.insert(&k, &v);
match &srv.server.cgienv {
Some(c) => {
for (k, v) in c.iter() {
envs.insert(&k, &v);
}
}
};
None => {}
}
let cmd = Command::new(path.to_str().unwrap())
.env_clear()