]> git.ipfire.org Git - thirdparty/haproxy.git/commit
[MINOR] add X-Original-To: header
authorMaik Broemme <mbroemme@plusserver.de>
Fri, 17 Apr 2009 16:53:21 +0000 (18:53 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 1 May 2009 14:22:33 +0000 (16:22 +0200)
commit2850cb42b61c55b65025ace66a804402251b3e1c
treed9b18a49943d0e48208647bf08b54abc83295b98
parent3909a2ab008e9fed1851bc68d5b6ff23c62c0a1e
[MINOR] add X-Original-To: header

I have attached a patch which will add on every http request a new
header 'X-Original-To'. If you have HAProxy running in transparent mode
with a big number of SQUID servers behind it, it is very nice to have
the original destination ip as a common header to make decisions based
on it.

The whole thing is configurable with a new option 'originalto'. I have
updated the sourcecode as well as the documentation. The 'haproxy-en.txt'
and 'haproxy-fr.txt' files are untouched, due to lack of my french
language knowledge. ;)

Also the patch adds this header for IPv4 only. I haven't any IPv6 test
environment running here and don't know if getsockopt() with SO_ORIGINAL_DST
will work on IPv6. If someone knows it and wants to test it I can modify
the diff. Feel free to ask me questions or things which should be changed. :)

--Maik
doc/architecture.txt
doc/configuration.txt
include/common/defaults.h
include/types/proxy.h
src/cfgparse.c
src/proto_http.c