Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions nym-api/src/node_status_api/local_guard.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,15 @@ use rocket::Request;
use std::fmt::Debug;
use std::net::{IpAddr, Ipv4Addr, Ipv6Addr};

#[allow(dead_code)]
#[derive(Debug)]
pub struct NonLocalRequestError;

/// Request guard that only allows requests coming from a local address
#[allow(dead_code)]
pub(crate) struct LocalRequest;

#[allow(dead_code)]
fn is_local_address(ip: Option<IpAddr>) -> bool {
if let Some(address) = ip {
match address {
Expand Down