Hello Ghislain,
If you use this line in your conf file:errorfile 403 
/etc/haproxy/errorfiles/403.http

You can write there the complete response, 403 in this case or 429 if you want.
####HTTP/1.0 403 ForbiddenCache-Control: no-cacheConnection: closeContent-Type: 
text/html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>####
...but all the responses with 403 will be 429.


Regards,



De: Baptiste <[email protected]>
Para: Ghislain <[email protected]> 
CC: [email protected] 
Enviado: Lunes 5 de agosto de 2013 10:42
Asunto: Re: http reject return code

Hi Ghislain,

This would work using the errorfile directive and the code 403.

Baptiste

On Wed, Jul 31, 2013 at 8:22 PM, Ghislain <[email protected]> wrote:
> hi,
>
>  still in my basic DOS protection rules i use http reject for http mode and
> the error returned is 403. In reality i would want it to send a 429 ( too
> many requests) but cannot find a way.
>
>  I was wondering if i simply use an error page that has in it the error
> code/message edited to match 429  but then the real 403 would get the  'too
> many request' message that does not fit.
>
>  Any ideas ?
>
> best regards,
> Ghislain.
>
>

                                          

Reply via email to