Skip to content

module Athena::Framework::IPUtils #

Includes various IP address utility methods.

Class methods#

.check(request_ip : String, ips : String | Enumerable(String)) : Bool#

Returns true if the provided IPv4 or IPv6 request_ip is contained within the list of ips or subnets.

View source

.check_ipv4(request_ip : String, ip : String) : Bool#

Returns true if request_ip matches ip, or is within the CIDR subnet.

View source

.check_ipv6(request_ip : String, ip : String) : Bool#

Returns true if request_ip matches ip, or is within the CIDR subnet.

View source