Liking cljdoc? Tell your friends :D

ring-firewall-middleware.core


default-deny-handlerclj

(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.
sourceraw docstring

get-forwarded-ip-addressesclj

(get-forwarded-ip-addresses request)

Gets all the forwarded ip addresses from a request.

Gets all the forwarded ip addresses from a request.
sourceraw docstring

honored-proxy-headersclj

source

in-cidr-range?clj

(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?
sourceraw docstring

in-cidr-ranges?clj

(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?
sourceraw docstring

private-address?clj

(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?
sourceraw docstring

private-subnetsclj

source

public-address?clj

(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?
sourceraw docstring

request-matches?clj

(request-matches? request access-list)

Does the ring request satisfy the access list?

Does the ring request satisfy the access list?
sourceraw docstring

rfc1918-private-subnetsclj

source

rfc4193-private-subnetsclj

source

wrap-allow-ipsclj

(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.

sourceraw docstring

wrap-deny-ipsclj

(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.

sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close