Application Gateway X-Forwarded-For IP:port is malformed
Possibly this can be resolved by settings only; if so needs better documentation.
X-Forwarded-For is only supposed to have IP address only (no ports). Our parser choked. In looking to improve the parser we very quickly discovered that as specified it causes a parse ambiguity in IPv6. That is, appending :port to an existing IPv6 address spelled with :: results in another valid IPv6 address. It would have worked if it was [IPv6]:port which is even more broken as compared to what the defacto standard is but is at least unambiguous.
Needs doc improvement and possibly code improvement. Or maybe just implement the standard Forwarded header. We can parse that.
Joshua Hudson commented
The reason I'm talking about improving the docs is because of the IPv6 stuff. Sure I can squash the port now with a setting, but what if I needed it?