On Thu, Jun 15, 2017 at 10:20:37AM +0800, ??? wrote:
> Hi,
> 
> Comma is a special symbol,Can do so:
> 
> backend b1
>       acl forward-exist req.hdr(X-Forwarded-For) -m found
>       http-request set-header X-Forwarded-For %[capture.req.hdr(2)],%ci if
> forward-exist
>       http-request set-header X-Forwarded-For %ci if !forward-exist
>       server def 127.0.0.1:81
> 
> frontend f1
>     mode http
>     listen 80
>     capture request header X-Forwarded-For len 100
>     default_backend b1

Well, that's a bit complicated a way to do it. If the purpose is to capture
the whole line, better use "req.fhdr()" instead of "req.hdr()". It will take
the whole header line instead of a single value.

Regards,
Willy

Reply via email to