Forum Discussion
Hamish
Apr 03, 2012Cirrocumulus
BigIP LTM and Nexus 7k NX-OS
Does anyone out there run BigIP (Viprion) connected to Cisco Nexus 7k switches? Do you use vPC's? Or just 1:1 port-channels? Any problems? (Sorry, we're looking at this in de...
Darren_21048
Jun 15, 2011Nimbostratus
Hi Colin,
Thanks for getting back to me, Here is the iRule as it stands at present and it's the only iRule on my test VIP. It seems to work if I have an end marker that in the html output is quite near the first regex, so for example having my last match as a .+> seems to work as I hit that fairly quickly (hence my theory that line feeds / carriage returns are what's giving me difficulty).
when HTTP_RESPONSE {
HTTP::header remove server
foreach header {Server Date X-Powered-By} {
while { [HTTP::header exists $header] } {
log local0. "Removing- $header: [HTTP::header value $header]"
HTTP::header remove $header
}
}
Disable the stream filter by default
STREAM::disable
Check if response type is text
if {[HTTP::header value Content-Type] contains "text"}{
Match any http:// instance and replace it with nothing
STREAM::expression {@
.*>@} - This doesn't break the page
STREAM::expression {@comments.start.here.+comments.end.here@}
STREAM::expression {@comments.start.here.*comments.end.here@}
Enable the stream filter for this response only
STREAM::enable
}
}
when STREAM_MATCHED {
log local0. "matched: [STREAM::match]"
STREAM::replace "[string map {[^A-Za-z][bB][uU][sS][^A-Za-z] *******} [STREAM::match]]"
STREAM::replace "[string map {helloooooooo XXXXXXXXXXX} [STREAM::match]]"
}
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