remote_ip v0.2.0 RemoteIp.Headers View Source

Entry point for parsing any type of forwarding header.

Link to this section Summary

Functions

Selects the appropriate headers and parses IPs out of them.

Link to this section Types

Link to this section Functions

Link to this function

considering(req_headers)

View Source
Link to this function

parse(headers, allowed)

View Source
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: