|
Clio
develop
The XRP Ledger API server.
|
A simple handler to add/check elements in a whitelist. More...
#include <WhitelistHandler.hpp>


Public Member Functions | |
| WhitelistHandler (Whitelist whitelist) | |
| Constructs a WhitelistHandler from an already-built Whitelist. | |
| bool | isWhiteListed (std::string_view ip) const override |
| Checks to see if the given IP is whitelisted. | |
| Public Member Functions inherited from web::dosguard::WhitelistHandlerInterface | |
| virtual | ~WhitelistHandlerInterface ()=default |
| Virtual destructor. | |
Static Public Member Functions | |
| template<SomeResolver HostnameResolverType = Resolver> | |
| static std::expected< WhitelistHandler, std::string > | create (util::config::ClioConfigDefinition const &config, HostnameResolverType &&resolver={}) |
| Creates a WhitelistHandler by loading all whitelisted IPs and masks from config. | |
A simple handler to add/check elements in a whitelist.
|
explicit |
Constructs a WhitelistHandler from an already-built Whitelist.
| whitelist | The whitelist to use |
|
inlinestatic |
Creates a WhitelistHandler by loading all whitelisted IPs and masks from config.
| config | The Clio config to use |
| resolver | The resolver to use for hostname resolution |
|
inlinenodiscardoverridevirtual |
Checks to see if the given IP is whitelisted.
| ip | The IP to check |
Implements web::dosguard::WhitelistHandlerInterface.