clj-http-ssrf.core

wrap-predicates

(wrap-predicates & {:keys [url-pred port-pred host-pred scheme-pred status headers body], :or {status 403, headers {}, body ""}})
Accepts a predicate each for requested scheme, url, port and host.

If any of the predicates return something falsey,
clj-http.client/get will return with the specified :status, :headers and :body.

:status defaults to 403,
:headers defaults to {}
:body defaults to ""

Returns a map of status code, header and body (as client would return)

wrap-validators

(wrap-validators & {:keys [regexes ports hosts status headers body], :or {status 403, headers {}, body ""}})
Accepts a list of regexes, ports, hosts
Returns a map of status code, header and body