Http header response

Hi,
I would like to implement HTTP HEADER RESPONSE in order to all requests processed by haproxy must return a header to identify which HAProxy instance we are going through. That’s the first point.

The second point would be to all requests to applications hosted on a K8s cluster must return a header that identifies which cluster the application responding to us is on.

Do you think is that possible ?
Thanks in advance for your opinion

Best regards

Hello,

You can try these :

Add a header field X-Via containing the client name of the current HAProxy server processing the traffic:

# Used in the a frontend, listen, or backend section
    http-response add-header X-Via %[env(HOSTNAME)]

Add a header field containing the back end and server name that processed the response:

# Used in the a frontend, listen, or backend section
    http-response add-header X-App-Server %b/%s

Both find on haproxy.com

Hope it helps