]> git.ipfire.org Git - thirdparty/haproxy.git/commit
[MEDIUM] add ability to connect to a server from an IP found in a header
authorWilly Tarreau <w@1wt.eu>
Mon, 7 Sep 2009 09:51:47 +0000 (11:51 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 30 Mar 2010 08:39:43 +0000 (10:39 +0200)
commitbce70882752cb728c264e7561ff6129101f14c86
treec9bf33c37d0b5572d68060df2a5ef8a7641e5fd5
parent090466c91a902ba25f0eb8ea6d61abc726d9b5e8
[MEDIUM] add ability to connect to a server from an IP found in a header

Using get_ip_from_hdr2() we can look for occurrence #X or #-X and
extract the IP it contains. This is typically designed for use with
the X-Forwarded-For header.

Using "usesrc hdr_ip(name,occ)", it becomes possible to use the IP address
found in <name>, and possibly specify occurrence number <occ>, as the
source to connect to a server. This is possible both in a server and in
a backend's source statement. This is typically used to use the source
IP previously set by a upstream proxy.
doc/configuration.txt
include/common/defaults.h
include/proto/proto_http.h
include/types/proxy.h
include/types/server.h
src/backend.c
src/cfgparse.c
src/proto_http.c