cancel
Showing results for 
Search instead for 
Did you mean: 
Login & Join the DevCentral Connects Group to watch the Recorded LiveStream (May 12) on Basic iControl Security - show notes included.

URL and User-Agent base allow

Sajid
Cirrostratus
Cirrostratus

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

4 REPLIES 4

Sajid
Cirrostratus
Cirrostratus

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?

Sajid
Cirrostratus
Cirrostratus

 

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.

Sajid
Cirrostratus
Cirrostratus

This irule validation is required, its only work with IE.

 

my requirement are

  1. User-Agent (IE)
  2. URL Query end with link (urllist)
  3. If User use IE application URL should work
  4. Else Message Browser not support
  5. 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