(default-deny-handler request)
Provides a default ring response for users who didn't meet the firewall requirements.
Provides a default ring response for users who didn't meet the firewall requirements.
(get-forwarded-ip-addresses request)
Gets all the forwarded ip addresses from a request.
Gets all the forwarded ip addresses from a request.
(in-cidr-range? cidr client-ip)
Is a given client ip within a given cidr range?
Is a given client ip within a given cidr range?
(in-cidr-ranges? cidr-ranges ip-address)
Is a given ip address in one of the provided cidr ranges?
Is a given ip address in one of the provided cidr ranges?
(private-address? ip-address)
Is this a private ip address as defined by RFC 1918 or RFC 4193?
Is this a private ip address as defined by RFC 1918 or RFC 4193?
(public-address? ip-address)
Is this not a private ip address as defined by RFC 1918 or RFC 4193?
Is this not a private ip address as defined by RFC 1918 or RFC 4193?
(request-matches? request access-list)
Does the ring request satisfy the access list?
Does the ring request satisfy the access list?
(wrap-allow-ips handler)
(wrap-allow-ips handler
{:keys [allow-list deny-handler]
:or {allow-list private-subnets
deny-handler default-deny-handler}})
Protect a ring handler with source ip authentication. Your allow-list ranges must cover any permitted clients as well as any intermediate proxy servers. The default allow-list ranges are the entire internal network space as defined by RFC 1918 and RFC 4193.
deny-list - cidr ranges collection that, if matched, will result in an allowed request. optionally provide a ref type in which case it will be dereferenced before use.
deny-handler - a function of a ring request that returns a ring response in the event of a denied request.
Protect a ring handler with source ip authentication. Your allow-list ranges must cover any permitted clients as well as any intermediate proxy servers. The default allow-list ranges are the entire internal network space as defined by RFC 1918 and RFC 4193. deny-list - cidr ranges collection that, if matched, will result in an allowed request. optionally provide a ref type in which case it will be dereferenced before use. deny-handler - a function of a ring request that returns a ring response in the event of a denied request.
(wrap-deny-ips handler)
(wrap-deny-ips handler
{:keys [deny-list deny-handler]
:or {deny-list private-subnets
deny-handler default-deny-handler}})
Protect a ring handler with source ip authentication. Your deny-list ranges must cover any forbidden clients / proxy servers. The default deny-list ranges are the entire internal network space as defined by RFC 1918 and RFC 4193.
deny-list - cidr ranges collection that, if matched, will result in a denied request. optionally provide a ref type in which case it will be dereferenced before use.
deny-handler - a function of a ring request that returns a ring response in the event of a denied request.
Protect a ring handler with source ip authentication. Your deny-list ranges must cover any forbidden clients / proxy servers. The default deny-list ranges are the entire internal network space as defined by RFC 1918 and RFC 4193. deny-list - cidr ranges collection that, if matched, will result in a denied request. optionally provide a ref type in which case it will be dereferenced before use. deny-handler - a function of a ring request that returns a ring response in the event of a denied request.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close