Difference between revisions of "Irule snippets"
Jump to navigation
Jump to search
(Created page with "# No paths ``` when HTTP_REQUEST { HTTP::host "api.dexample.com" pool mypool } ``` # using path based ``` when HTTP_REQUEST { switch -glob -- [string tolower [HTTP...") |
|||
Line 2: | Line 2: | ||
``` | ``` | ||
when HTTP_REQUEST { | when HTTP_REQUEST { | ||
− | HTTP::host "api. | + | HTTP::host "api.example.com" |
pool mypool | pool mypool | ||
} | } |
Latest revision as of 23:33, 11 September 2023
No paths
when HTTP_REQUEST { HTTP::host "api.example.com" pool mypool }
using path based
when HTTP_REQUEST { switch -glob -- [string tolower [HTTP::path]] { "some/path/*" { HTTP::host "api.example.com" pool mypool } default { log local0. "Hit default for [HTTP::uri]" HTTP::host "api.example.com" pool mypool } } }