Same-host bypass. Accepts any request whose peer socket is a loopback
address. Intended for the BeamNative transport and for HTTP deployments
where the port is only bound to 127.0.0.1.
Options
:allow_beam_native(defaulttrue) —:beampeers are always loopback-equivalent (same node or clustered connected node).:extra_allowed_ips— additional IP addresses to treat as loopback (tuples like{192, 168, 1, 10}). Useful for trusted LAN hosts.
Behaviour
peer: :localor{:beam, _}→ accepted.peer: {:tcp, {127, 0, 0, 1}}or{0, 0, 0, 0, 0, 0, 0, 1}→ accepted.- Anything else →
:unauthenticated.
Returns %{scheme: :localhost, principal: nil, extra: %{peer: <info>}}.