Forum Discussion

Jared_01_140721's avatar
Jared_01_140721
Icon for Nimbostratus rankNimbostratus
Jan 03, 2014

Hide what browser is being used

I have an web application that doesn't support safari by choice. (They want you to buy the application). Is there a way to hide the fact that Safari is being used, or tell the application that IE is being used instead?

 

2 Replies

  • You could rewrite the user-agent header:

     user-agent from: http://www.useragentstring.com/pages/Safari/
    when HTTP_REQUEST {
       switch -glob [string tolower [HTTP::header User-Agent]] {
          "*safari*" {
             HTTP::header replace "User-Agent" "my custom user-agent string"
          }
       }
    }
    

    Aaron

  • John_Alam_45640's avatar
    John_Alam_45640
    Historic F5 Account

    Do you want to apply it to one URI? like this?

     user-agent from: http://www.useragentstring.com/pages/Safari/
    
    when HTTP_REQUEST {
      if { [HTTP::uri] equals "/x/y/z" } {
       switch -glob [string tolower [HTTP::header User-Agent]] {
          "*safari*" {
             HTTP::header replace "User-Agent" "my custom user-agent string"
          }
       }
      }
    }