Setting a http-response header with redirect


#1

Running HAProxy version 1.7.5-2~bpo8+1 on Debian 8

What I’m trying to do is add HTTP headers with a http-request redirect to the response sent to the client. Above the http-request redirect I have http-response set-header Strict-Transport-Security 'foo bar', but the header is not set in the 302 response.

Thanks


#2

https://www.mail-archive.com/haproxy@formilux.org/msg25061.html

This works but it’s kind of ugly. Maybe someone should add an option to http-request redirect that adds a header?