Re: How to log %[hdr_ip(X-Forwarded-For,-1)]

2019-12-02 Thread Aleksandar Lazic
. Regards Aleks Thanks. JWD *From:* Aleksandar Lazic <mailto:al-hapr...@none.at> *Date:* 2019-12-02 18:42 *To:* JWD <mailto:j...@163.com>; haproxy <mailto:haproxy@formilux.org> *Subject:* Re: How

Re: How to log %[hdr_ip(X-Forwarded-For,-1)]

2019-12-02 Thread Aleksandar Lazic
Hi. Am 02.12.2019 um 09:27 schrieb JWD: Hi,all I want to write %[hdr_ip(X-Forwarded-For,-1)] to log, how to do that? And how to log it with [if] confition? Like set-header below: http-request set-header X-Client-IP %[hdr_ip(X-Forwarded-For,-1)] if !{  hdr(X-Client-IP) -m found } { hdr(X-For

How to log %[hdr_ip(X-Forwarded-For,-1)]

2019-12-02 Thread JWD
Hi,all I want to write %[hdr_ip(X-Forwarded-For,-1)] to log, how to do that? And how to log it with [if] confition? Like set-header below: http-request set-header X-Client-IP %[hdr_ip(X-Forwarded-For,-1)] if !{ hdr(X-Client-IP) -m found } { hdr(X-Forwarded-For) -m found } http-request se