On Sat, Sep 06, 2014 at 12:20:48AM -0300, Marcelo Milhomem wrote:
> Today we can balance requests by user's location using a string geohash
> header and an ACL with hdr_beg(). We now have some request that only have
> the Latitude and Longitude from GPS but is too hard to match against it, we
> know that these numbers can be converted to geohash like this library do
> https://github.com/simplegeo/libgeohash/blob/master/geohash.c
> Is there a way that we can use two headers values(double type) as
> parameters to a geohash function and match the result(string type) using
> hdr_beg()?
I don't know how this thing works, but there's a trick to combine multiple
headers into one. You can use the add-header action of the http-request
ruleset, and build a new header from the two other ones. Example :
http-request add-header x-foo %[hdr(header1)]%[hdr(header2)]
Then you can balance on hdr(x-foo). I don't know if that can help you here.
Willy