Help creating a dynamic acl/action

Reaching out to the masterminds of HAproxy

Today i have ACL rules (repeated >100 times) like this in my frontend;

subdom1 IF ssl_fc_sni -i
subdom2 IF ssl_fc_sni -i
subdom3 IF ssl_fc_sni -i

subdom1 use backend bk_subdom1
subdom2 use backend bk_subdom2
subdom3 use backend bk_subdom3
default use bk_default

Can I somewhat use the subdomain name dynamically to address the backend, so instead of 100 rows I will have one single row, and just manage this by adding new backends.


use_backend name can be dynamic:

There should be nothing preventing you from building the appropriate rule.

I have to excuse myself for beeing a n00b, but how do i sample that ssl_fc_sni in the acl to use part of it in the action? - or can i refer it directly in the Action?

  • if so - how to failover to default backend…