HAProxy community

Setting a http-response header with redirect


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.




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