Forum Discussion
yosry92_331999
Jan 15, 2018Nimbostratus
http agent irule
i want to make an irule that allow only ios & android only to access application
can someone help me with that??
Stanislas_Piro2
Jan 15, 2018Cumulonimbus
this code may detect all devices (Maybe you can search user-agent for AppleTV and Apple Watch). The ua variable contains the lowercase user-agent, so only search for lowercase string.
when HTTP_REQUEST {
if {[set ua [string tolower [HTTP::header User-Agent]]] contains "iphone" || $ua contains "ipad" || $ua contains "android"} {
This client is an iPhone, iPad or an Android device
}
}
Note : code updated (a closing bracket was missing)
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects