Hi.

Am 10.07.2019 um 15:38 schrieb Ricardo Fraile:
> Hello,
> 
> 
> I have multiple backends and some of them share the same acl for the
> static content, as example:
> 
> 
> backend back-1
>     acl no-cookie path_end .gif .jpg .png (+15 more)
>     ignore-persist if no-cookie
>     ...
> 
> backend back-2
>     acl no-cookie path_end .gif .jpg .png (+15 more)
>     ignore-persist if no-cookie
>     ...
> 
> 
> I try to look for a solution to define once the "acl no-cookie" but I
> can't find a workaround because it only works if I define it under the
> same backend.
> 
> As middle step, I tried with env vars but it didn't work:
> 
> global
>     setenv px-static .gif .jpg .png
> 
> backend back-1
>     acl no-cookie path_end ${px-static}
>     ignore-persist if no-cookie
>     ...
> 
> 
> Does anyone know an alternative method to avoid define the same acl in
> each backend, or at least, define once the list of file extensions?

How about the following, untested:

ignore-persist if { path_end -f /tmp/file-extensions.acl }

shameless copied from https://www.haproxy.com/blog/introduction-to-haproxy-acls/


> Thanks,

Regards
Aleks

Reply via email to