Forum Discussion

jay_41157's avatar
jay_41157
Icon for Nimbostratus rankNimbostratus
Apr 12, 2011

scrub out going traffic.

HI,

 

 

I need to be able to scrub the response going to the end user.

 

 

What I need is the F5 only send back data that is between the below tags and drop the rest.

 

.....

 

 

 

Any suggestions on how I can do this?

 

 

Thanks,

 

Jay

 

14 Replies

  • I agree with Joel. Using just a stream profile would mean the stream filter is applied to all request and response payloads. Most scenarios don't require request payload checking and only need checking of text response payloads. So you can get inadvertent matching and unnecessary checking without an iRule.

     

     

    It would be great if the stream filter had these options configurable via the GUI, but that request for enhancement hasn't been picked up.

     

     

    Aaron
  • Arie's avatar
    Arie
    Icon for Altostratus rankAltostratus
    Keep in mind that if you delete or add characters the Content-Length will change. This may lead to unintended consequences. A workaround is to replace characters with spaces or something similar.
  • Good point. You can also handle the change in content length by using a custom HTTP profile with response chunking set to rechunk:

     

     

     

    http://devcentral.f5.com/wiki/default.aspx/iRules/STREAM__expression.html

     

     

    When performing stream replacements where the original and replacement strings are different lengths, you must force BIG-IP to discard the server's Content-Length header and chunk the data before sending the response onto the client. This can be done by applying a custom HTTP profile to the virtual server with Response Chunking set to "Rechunk". See AskF5 SOL6422 for details.

     

     

     

    Aaron