Hi,
On Tue, Jun 25, Ricardo Fraile wrote:
> I'm trying to set an acl for multiple status codes. As example, using
> only for one works:
>
> http-response set-header Cache-Control max-age=60 if { status 302 }
>
> but with more than one, trying with a regex, fails because it is not
> implemented in httpr-response:
>
> http-response set-header Cache-Control max-age=60 if { rstatus 3* }
>
> produces the following error:
>
> error detected while parsing an 'http-response set-header' condition :
> unknown fetch method 'rstatus' in ACL expression 'rstatus'.
>
>
>
> The "rstatus" is available only under "http-check expect". Are there any
> equivalence to the regext status matching?
You can use multiple conditions:
http-response set-header Cache-Control max-age=60 if { status ge 300 } { status
lt 400 }
should match if status is between 300-399.
-Jarno
--
Jarno Huuskonen