Hi guys,

I figured I could use map feature of 1.5, but I'm coming up short, trying to change this:

 use_backend %[req.hdr(host),lower,map(/path/tofile)]


To instead take a part of the uri.

I can't find any list of functions (such as hdr, hdr_end etc.) in the docs :(

I figured I could use "something like" regrep instead of hdr(host)?


Klavs Klavsen wrote on 01/26/2016 02:53 PM:
Hi guys,

we have a long list of backends (want to monitor each application on a
tomcat behind us) - and would like to use part of the url ( first part
between / / ) to identify the backend (in haproxy) to use.

so if we get a request for /sebseb/api/whatever - we'd like to use
backend named kki-sebseb.

we figure this should not be dangerous since haproxy seems fairly well
coded - so a request for something bogus, should just result in the
backend being invalid - and returning a 504 (we hope) ?

I can't seem to find any examples on the net.. and can't figure it out
from the haproxy 1.5 docs..

I was hoping any of you had some hints :)



--
Regards,
Klavs Klavsen, GSEC - k...@vsen.dk - http://www.vsen.dk - Tlf. 61281200

"Those who do not understand Unix are condemned to reinvent it, poorly."
  --Henry Spencer


Reply via email to