remote_ip v0.1.1 RemoteIp.Headers

Entry point for parsing any type of forwarding header.

Summary

Functions

Selects the appropriate headers and parses IPs out of them

Types

allowed()
allowed :: %MapSet{map: term}
header()
header :: {key, value}
ip()
ip :: :inet.ip_address
key()
value()

Functions

parse(headers, allowed)
parse([header], allowed) :: [ip]

Selects the appropriate headers and parses IPs out of them.

  • headers - The entire list of the Plug.Conn req_headers
  • allowed - The list of headers RemoteIp is configured to look for, converted to a MapSet for efficiency

The actual parsing is delegated to the RemoteIp.Headers.* submodules: