On 12/08/2010 08:36 PM, Victor Lucero wrote:
Hi.
Im writing a plugin to implement Load balancing. im facing some problem doing it with a
remap plugin because its looks like when i alter new_host its also alter the
"host" header in the http petition (and i dont want that)
I need a way to alter the conection to Original Server and change the ip(so i
can select between the servers in the pool). but there is no hook in this step.
You have two options:
1) Set the global config to preserve the host header:
CONFIG proxy.config.url_remap.pristine_host_hdr INT 1
(this is actually the new default on trunk, which will be in v2.1.5, so
beware if you depend on it being disabled).
2) On each remap rule, you can toggle the global value, e.g.
map http://www.example.com http://real.example.com
@pristine_host_hdr=1
There's also a bug filed to improve the remap plugin APIs (I think they
need a major overhaul), see https://issues.apache.org/jira/browse/TS-317
, and to some extent (I'll comment more on it later),
https://issues.apache.org/jira/browse/TS-588 .
I hope this helps?
-- Leif