slogsdon / elixir-reverse-proxy

A Plug based, reverse proxy server written in Elixir.
https://hex.pm/packages/reverse_proxy
MIT License
147 stars 34 forks source link

Crash when handling IPv6 requests #20

Open vovayartsev opened 4 years ago

vovayartsev commented 4 years ago

Version: v0.3.1 (from hex.pm)

Environment: Phoenix app in Kubernetes, behind CloudFlare CDN

Problem: IPv6 requests end up crashing on this line:

(reverse_proxy) lib/reverse_proxy/runner.ex:91: ReverseProxy.Runner.ip_to_string({0, 0, 0, 0, 0, 65535, 2624, 62194})

Solution It seems to have been fixed in https://github.com/slogsdon/elixir-reverse-proxy/commit/36efe899104cb6db6496c1664b79ead552024f07 - it's just a matter of releasing it to Hex?

Temporary workaround I switched to using this in my mix.exs

{:reverse_proxy, github: "slogsdon/elixir-reverse-proxy"}