gonx icon indicating copy to clipboard operation
gonx copied to clipboard

Space between IP Addresses in $http_x_forwarded_for

Open jasonrogena opened this issue 6 years ago • 1 comments

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])+.

jasonrogena avatar Jan 16 '18 15:01 jasonrogena

当 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

typ431127 avatar Sep 28 '22 05:09 typ431127