Clio develop
The XRP Ledger API server.
Loading...
Searching...
No Matches
web::dosguard::Whitelist Class Reference

A whitelist to remove rate limits of certain IP addresses. More...

#include <WhitelistHandler.hpp>

Public Member Functions

void add (std::string_view net)
 Add network address to whitelist.
 
bool isWhiteListed (std::string_view ip) const
 Checks to see if ip address is whitelisted.
 

Detailed Description

A whitelist to remove rate limits of certain IP addresses.

Member Function Documentation

◆ add()

void web::dosguard::Whitelist::add ( std::string_view net)

Add network address to whitelist.

Parameters
netNetwork part of the ip address
Exceptions
std::runtime::errorwhen the network address is not valid

◆ isWhiteListed()

bool web::dosguard::Whitelist::isWhiteListed ( std::string_view ip) const

Checks to see if ip address is whitelisted.

Parameters
ipIP address
Exceptions
std::runtime::errorwhen the network address is not valid
Returns
true if the given IP is whitelisted; false otherwise

The documentation for this class was generated from the following files: