Re: http-response set-header and redirect

2021-06-11 Thread James Brown
Thanks! On Fri, Jun 11, 2021 at 11:36 AM Tim Düsterhus wrote: > James, > > On 6/11/21 8:28 PM, James Brown wrote: > > Is there any reason (performance or otherwise) to use http-response > instead > > of just turning everything into http-after-response? > > There is a difference: If a

Re: http-response set-header and redirect

2021-06-11 Thread Tim Düsterhus
James, On 6/11/21 8:28 PM, James Brown wrote: Is there any reason (performance or otherwise) to use http-response instead of just turning everything into http-after-response? There is a difference: If a http-response rule fails [1] then a standard error page will be emitted. For this error

Re: http-response set-header and redirect

2021-06-11 Thread James Brown
Is there any reason (performance or otherwise) to use http-response instead of just turning everything into http-after-response? On Fri, Jun 11, 2021 at 11:07 AM Tim Düsterhus wrote: > James, > > On 6/11/21 8:03 PM, James Brown wrote: > > Is there any way to set a HTTP header on a redirect

Re: http-response set-header and redirect

2021-06-11 Thread Tim Düsterhus
James, On 6/11/21 8:03 PM, James Brown wrote: Is there any way to set a HTTP header on a redirect being emitted by haproxy? To also match HAProxy generated responses (including redirects and error pages) you will need to use 'http-after-response':

http-response set-header and redirect

2021-06-11 Thread James Brown
Is there any way to set a HTTP header on a redirect being emitted by haproxy? Given the following simplified config: global log stdout user defaults log global timeout client 9s timeout server 10s timeout connect 1s frontend test_fe mode http http-response