Forum Discussion
URL and User-Agent base allow
Trying to implement irule for a virtual server to check
User-Agent = Internet Explorer only (application compatible issue)
and URL
if the condition is true allows URL else message your browser is not compatible with Application access.
Regards,
Sajid
- SajidCirrostratus
Trying to achieve below
URL:
https://abc.mydomain.com/cas/login?service=https://sso.mydomain.com:443/ssomger/c/INB
User-Agent: Trident (IE 11.0) only
when HTTP_REQUEST {
if { ([class match [HTTP::header "User-Agent"] contains supported_browser]) && ([HTTP::uri] contains "/INB" ) } {
else {
HTTP::respond 200 content "Web Browser not compatible "
With Best Regards,
Sajid
What's the issue? I see you are using datagroup where you will set allowed browser list. Is your irule not working as expected? Is it possible for you to share your complete irule?
- SajidCirrostratus
when HTTP_REQUEST {
if { ([class match [HTTP::header "User-Agent"] contains supported_browser]) && ([HTTP::uri] contains "/INB" ) } {
return
}
else {
HTTP::respond 200 content "Browser not supported, kindly use IE 11.0 only" }
}
only else statement working with IE and firefox.
- SajidCirrostratus
This irule validation is required, its only work with IE.
my requirement are
- User-Agent (IE)
- URL Query end with link (urllist)
- If User use IE application URL should work
- Else Message Browser not support
- All other URLs should work with IE, Firefox, Chrome etc.
when HTTP_REQUEST {
if { !([class match [HTTP::header "User-Agent"] contains "supported_browser"] || {class match [HTTP::query] ends_with "urllist"})} {
HTTP::respond 200 content "Browser not supported for custom application, kindly contact Support Team"
}
}
Regards,
Sajid
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