Re: I'm getting different x_forwarded_for in my Gorouter access logs depending on what browser/cli-tool I use.

Simon Johansson <simon@...>!searchin/golang-nuts/Inconsistent$20X-Forwarded-For/golang-nuts/iUnZgzrOszI/ngxcLbSm1VYJ

Mail thread about the issue at golang-nuts.

This is not really a massive issue for us, the main use we have for this is to get the source IP, so whatewher comes after that is not really looked at in our env.

This issue is howewher quite confusing and its not obvious why there is inconsistency, I dont know how big of a deal that will be for other deployments. But the easy fix would be to copy setRequestXForwardedFor for proxy and just call it before we call p.accessLogger.Log in the defer in ServeHTTP.

Join to automatically receive all group messages.