Forum Discussion
Alfonso_Santia2
Altostratus
Jan 16, 2021Block access to apps by browser. Allow only iPhone or Android accesss
Customer has an application that they want access only through the mobile device app. They have recently found that the application can be accessed through any browser. We have configured the foll...
Daniel_Wolf
MVP
Jan 18, 2021Hi Alfonso,
this iRule should work. However I strongly discourage the use of it. User-Agent Headers can be forged easily. Anyone who knows how to access Developer Tools in a browser can change his User-Agent string to whatever they want.
when HTTP_REQUEST {
if {([string tolower [HTTP::header "User-Agent"]] contains "iphone") || ([string tolower [HTTP::header "User-Agent"]] contains "android") } {
return
} else {
reject
}
}Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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