gonx
gonx copied to clipboard
Space between IP Addresses in $http_x_forwarded_for
Nginx's $http_x_forwarded_for
can contain multiple IP addresses (in cases where a reverse proxy is used). In such cases the format used is [IP Address]([Comma][Space][IP Address])+
. I guess since this value is gotten from the X-Forwarded-For header.
Gonx is able to parse [IP Address]([Comma][Space][IP Address])+
but not [IP Address]([Comma][IP Address])+
.
当 http_x_forwarded_for 有多个ip时,没有办法解析日志,我使用 conradolega https://github.com/conradolega/gonx/tree/fix-http-forwarded-for 解决了这个问题
When http_x_forwarded_for has multiple ips, there is no way to parse the logs, I solved the problem using conradolega https://github.com/conradolega/gonx/tree/fix-http-forwarded-for