A plug to rewrite the Plug.Conn's remote_ip based on forwarding headers.
Logger
metadata; see #22RemoteIp.Options
RemoteIp.Debugger
RemoteIp.Parser
:proxies
& :clients
recognize all valid CIDR strings as well as individual IPs, and it's more performant
Fixes issue where bad Unicode input in the headers would raise an exception. See #19.
New functionality! 🎉
RemoteIp.from/2
so you can retrieve the retrieve the originating client IP from a given list of headers without using a plug. See #9 for background.RemoteIp.init/1
the new :clients
option, which lets you override the default loopback/reserved addresses automatically appended to :proxies
. See #8, #10, and #11 for background.~> 1.5
, as earlier versions are no longer officially supported.Fixes mix release
errors under Elixir 1.9. See #1, #12, #14, #15, #16, #17.
Miscellaneous maintenance
Kernel.to_char_list/1
(cf. https://github.com/elixir-lang/elixir/issues/4909, https://github.com/elixir-lang/elixir/pull/4582). Since the mixfile here locks us to Elixir ~> 1.3, it should be safe to just use Kernel.to_charlist/1
.Silence Elixir 1.4 warnings to do with zero-arity function calls that don't use parens.
This is a backwards-compatible change with Elixir 1.3, but stops Elixir 1.4 from badgering you.
Cf. https://github.com/elixir-lang/elixir/issues/3268 and #2.
v0.1.1 succeeded in only fixing one runtime issue for Erlang deploys (i.e., apps built using something like distillery). Forwarded
header parsing would still break because a dependency was not being declared in the application definition.
This release adds all dependencies to the application definition, so Erlang deploys should now work. :+1:
Add inet_cidr dependency to included_applications, since its absence apparently breaks the Erlang release of your app. :scream:
Initial release.