IpAccessControl.Options (IP Access Control Plug v1.1.0)
View SourceManage IpAccessControl options
Summary
Types
@type config() :: %{ allow: (-> [binary(), ...]) | [binary(), ...], on_blocked: (Plug.Conn.t(), Plug.opts() -> Plug.Conn.t()), response_code_on_blocked: integer(), response_body_on_blocked: String.t() }
@type input_config() :: [ module: module(), allow: (-> [binary(), ...]) | [binary(), ...], on_blocked: (Plug.Conn.t(), Plug.opts() -> Plug.Conn.t()) | module(), response_code_on_blocked: integer(), response_body_on_blocked: String.t() ]
Functions
@spec default(:on_blocked | :response_code_on_blocked | :response_body_on_blocked) :: {IpAccessControl, :ip_access_on_blocked} | 401 | String.t()
The default value for the given option.
@spec pack(input_config()) :: config()
Pre-processes keyword options. Where possible, function resolution will be
delayed until unpack/1 is called.
Evaluate preprocessed options.