sandman748
Sep 23, 2020Nimbostratus
Please help with irule for pool selection based on custom http header
Hi all,
Could someone assist me with an irule that would look at a custom header callled X-Server-Pool. If "xyz" then this pool, if "abc" then this pool, else default.
I think this is a starting point but it doesnt appear to be working
- when HTTP_REQUEST {
- if { [HTTP::header exists X-SERVER-POOL] and [HTTP::header X-SERVER-POOL] equals "xyz" } {
- pool xyz
- } elseif [HTTP::header exists X-SERVER-POOL] and [HTTP::header X-SERVER-POOL] equals "abc" } {
- pool abc
- }
- }
- }
If no header exists it would hit default pool assigned to vip?