hi Jim, hdr_end could do the trick if you include the '.' in the matching string.
Baptiste On Wed, Jun 3, 2015 at 4:55 PM, Jim Gronowski <jgronow...@ditronics.com> wrote: > I’m not very familiar with the map function, but does hdr_end(host) work in > this context? > > > > If so, in order to only match *.foo.com and not blahfoo.com, you’d need to > include the dot in your map – ‘.foo.com’ instead of ‘foo.com’. > > > > > > From: David Reuss [mailto:shuffle...@gmail.com] > Sent: Wednesday, June 03, 2015 05:23 > To: haproxy@formilux.org > Subject: Dynamic backend selection using maps > > > > Hello, > > > > I have this use_backend declaration: > > > > use_backend > %[req.hdr(host),lower,map_dom(/etc/haproxy/worker.map,b_nodes_default)] > > > > Which seems to work wonderfully, but say i have "foo.com" in my map, it will > match foo.com.whatever.com, and ideally i'd like to only match if the domain > ends with my value (foo.com), and also, it should NOT match blahfoo.com > > > > How would i achieve that? > > > > Ditronics, LLC email disclaimer: > This communication, including attachments, is intended only for the > exclusive use of addressee and may contain proprietary, confidential, or > privileged information. Any use, review, duplication, disclosure, > dissemination, or distribution is strictly prohibited. If you were not the > intended recipient, you have received this communication in error. Please > notify sender immediately by return e-mail, delete this communication, and > destroy any copies.