Can HAProxy do that?

From: zabrane Mikael <zabrane3#gmail.com>
Date: Tue, 6 Jul 2010 21:40:37 +0200


Hi List,

I'm new to HAProxy, so please apologize if the question was already asked before.

I've a homemade web server running on my internat. It works like this.

  1. If an HTTP request arrives without a special header "X-RAWDATA: ...", this web server forward the request to the live Web, get the response, and send it back (i.e it plays a role of a basic proxy).
  2. Now, if a request contains the special header "X-RAWDATA: ...", then the web server will search the response in its internal database (complex computations), and send it back.

Point 2 works very very well. But not point 1 as my web server isn't a true HTTP proxy.

So, my question is simple:

Could I tell HAProxy to inspect the HTTP headers, and decide:

  1. If the special header "X-RAWDATA: ..." doesn't exists, let the request go to the live Web directly.
  2. Otherwise, forward the request to my webserver.

Hope I'm clear guys.

Thanks in advance.

-- 
Regards
Zab
Received on 2010/07/06 21:40

This archive was generated by hypermail 2.2.0 : 2010/07/06 21:45 CEST