Skip to content

Commit

Permalink
check for onion
Browse files Browse the repository at this point in the history
  • Loading branch information
electrum17 committed Jul 31, 2020
1 parent 477586f commit ee60765
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions api/src/handlers/peers_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,8 @@ impl Handler for PeerHandler {
peer_addr = PeerAddr::from_ip(ip_addr);
} else if let Ok(addr) = command.parse() {
peer_addr = PeerAddr::Ip(addr);
} else if let Ok(onion) = command.parse() {
peer_addr = PeerAddr::Onion(onion);
} else {
return response(
StatusCode::BAD_REQUEST,
Expand Down

0 comments on commit ee60765

Please sign in to comment.