For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

Angelo's avatar
Angelo
Icon for Nimbostratus rankNimbostratus
Oct 31, 2012

Streaming Irule

Hi

 

 

I have a streaming profile with a i-rule to re-write content in a XML WSDL. but i reconfigured the VS for port 80 and 443 is there a way to disable the streaming for connections on port 80

 

 

this is the rule...

 

 

when HTTP_REQUEST {

 

 

STREAM::disable

 

HTTP::header remove "Accept-Encoding"

 

}

 

when HTTP_RESPONSE {

 

 

if {[HTTP::header value Content-Type] contains "text"}{

 

 

STREAM::expression {@http://uat.esf.mtn.co.za@https://uat.esf.mtn.co.za@}

 

 

STREAM::enable

 

}

 

}

 

3 Replies

  • I'd venture something as simple as capturing the local port:

    
    when HTTP_REQUEST {
       STREAM::disable
       if { [TCP::local_port] != 80 } { 
          HTTP::header remove "Accept-Encoding"
       }
    }
    when HTTP_RESPONSE {
       if { [TCP::local_port != 80 and [HTTP::header value Content-Type] contains "text" }{
          STREAM::expression {@http://uat.esf.mtn.co.za@https://uat.esf.mtn.co.za@}
          STREAM::enable
       }
    }
    

  • You could add a check for the pool member source port and skip the stream replacement if it's port 80. You should be able to use the [TCP::server_port] command I would have thought.