Forum Discussion
jay_41157
Nimbostratus
Apr 12, 2011scrub 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
- hoolio
Cirrostratus
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 - James_Quinby_46Historic F5 AccountOK, those make sense. Thanks, guys.
- Arie
Altostratus
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. - hoolio
Cirrostratus
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
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects
