Re: using backend node details in acls/response manipulation
Hi Martin, HAProxy can report an 'id' of a backend and of a server. You can give a try to this: http-response set-header X-Backend-Info %[be_id]/%[srv_id] if { src 10.0.0.0/24 } It should add the following header if the first server of the first backend was used: X-Backend-Info: 1/1 IDs can be forced in HAProxy's configuration using the directive 'id'. You may even be able to convert a backend id to a string using a map: http://cbonte.github.io/haproxy-dconv/configuration-1.5.html#map Baptiste On Tue, Mar 24, 2015 at 8:36 PM, Martin Nikolov wrote: > Hi guys, > I'm wondering if it is possible to use things like selected backend node's > ip, name or port as variables. My goal is to set a header in the http > response with the selected backend's details to a certain set of source ip > addresses (hence the acl, which is the easy part). I searched in the > documentation, but was not able to find a solution. > > Thanks in advance. > Regards.
Re: using backend node details in acls/response manipulation
Thanks, I sent request previously to you but I have done it. Ha. - Original Message - From: "Martin Nikolov" To: haproxy@formilux.org Sent: Tuesday, March 24, 2015 3:36:36 PM Subject: using backend node details in acls/response manipulation Hi guys, I'm wondering if it is possible to use things like selected backend node's ip, name or port as variables. My goal is to set a header in the http response with the selected backend's details to a certain set of source ip addresses (hence the acl, which is the easy part). I searched in the documentation, but was not able to find a solution. Thanks in advance. Regards.
using backend node details in acls/response manipulation
Hi guys, I'm wondering if it is possible to use things like selected backend node's ip, name or port as variables. My goal is to set a header in the http response with the selected backend's details to a certain set of source ip addresses (hence the acl, which is the easy part). I searched in the documentation, but was not able to find a solution. Thanks in advance. Regards.