Forum Discussion
User-Agent Irule to avoid APM policy
- Sep 03, 2019
What do you mean with 'avoid APM policy'? If you want to disable the APM policy for some devices you can use the ACCESS::disable command. See: https://clouddocs.f5.com/api/irules/ACCESS__disable.html
For the iRule, try this:
switch -glob [string tolower [HTTP::header "User-Agent"]] { "*iphone*" - "*ipod*" - "*android*" - "*windows mobile*" - "*windows phone*" - "*nintex-mobile*" - "*nintex-tablet*" { pool Test-pool } default { } }
What do you mean with 'avoid APM policy'? If you want to disable the APM policy for some devices you can use the ACCESS::disable command. See: https://clouddocs.f5.com/api/irules/ACCESS__disable.html
For the iRule, try this:
switch -glob [string tolower [HTTP::header "User-Agent"]] {
"*iphone*" -
"*ipod*" -
"*android*" -
"*windows mobile*" -
"*windows phone*" -
"*nintex-mobile*" -
"*nintex-tablet*" {
pool Test-pool
}
default {
}
}
Hi Niels,
Yes to avoid APM Policy, Using below irule and it is working.
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::header User-Agent]] {
"*iphone*" -
"*ipod*" -
"*android*" -
"*Windows Mobile*" -
"*Windows Phone*" -
"*nintex-mobile*" -
"*nintex-tablet*" {
log local0. "APM disabled."
ACCESS::disable
} default {
ACCESS::enable }
}
}
- Sep 03, 2019
Nice! Make sure you change 'Windows Mobile' and 'Windows Phone' to all lowercase to match the [string tolower [HTTP::header User-Agent]] statement.
- irshadSep 03, 2019Nimbostratus
Thanks Niels !!!
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com