Fetcher::ValidatedIpStore
Encapsulates the validated IP cache used for DNS rebinding mitigation. Keeps mutation localized behind a Mutex and provides a small API used by Fetcher::URLValidator. This lets URLValidator remain a facade while the cache implementation is easier to replace (actor, external store, etc.).
Constructors
Instance methods
Check for rebinding. Returns:
- true/false if there was a recent entry for this host (entry.ip == current_ip);
- nil if no recent entry existed (caller may then perform additional checks).
max_entries
SourcePurge expired entries older than provided expiry (or the store's ttl).
Called implicitly by register when approaching max capacity (80%).
Register a host -> ip mapping with current timestamp.