In a backend have a list of servers.
Need to add an AWS CloudFront server, which needs a matching Host header (different than the default.
Plan to use http-request set-header Host host.name if { condition }
but can’t find a suitable (working) condition.
Is this possibly? If so, how to match the AWS CF server while leaving the others alone?
Thanks,
Gerardo
Found a way, quite ugly.
Separate backends, put the AWS CF server in its own backend with an unconditional set header
The rest of servers in the other backend.
http-request set-var(txn.rand_backend) rand(100)
use_backend bk1 if { var(txn.rand_backend) -m int gt 100 }
use_backend bk1_aws_cf if { var(txn.rand_backend) -m int ge 0 }
Can this be improved? Have to take this decision very early
Thanks,
Gerardo