Port checked from config

This commit is contained in:
int 80h
2020-05-08 16:12:09 -04:00
parent a066e54acc
commit 24a47ccd70
2 changed files with 4 additions and 4 deletions

View File

@@ -128,9 +128,9 @@ async fn handle_connection(mut con: conn::Connection, srv: &config::ServerCfg) -
con.send_status(status::Status::ProxyRequestRefused, "Url doesn't match certificate!").await?;
return Ok(());
}
// TODO get port from config
match url.port() {
Some(p) => { if p != 1965 {
Some(p) => { if p != srv.port {
con.send_status(status::Status::ProxyRequestRefused, "Wrong Port!").await?;
}},
None => {}