webserver: remove ip check

If the server is bound to a non-loopback interface the API would be rendered useless.
This commit is contained in:
Naim A 2020-08-23 22:40:58 +03:00
parent db28591026
commit 92ae9e7954

View file

@ -89,7 +89,7 @@ fn authenticate(tokens: HashMap<String, String>) -> impl Filter<Extract = (), Er
async move { async move {
if let Some(addr) = peer_addr { if let Some(addr) = peer_addr {
if let Some(token) = token.token { if let Some(token) = token.token {
if addr.ip().is_loopback() && tokens.contains(&token) { if tokens.contains(&token) {
return Ok(()); return Ok(());
} }
} }