Forum Discussion
html tag remove
Hi dhlee659,
you have to attach a STREAM profile to your Virtual Server and then use the iRule below as a starting point...
when HTTP_REQUEST {
Remove "Accept-Encoding" header to force the server to send clear text responses.
HTTP::header remove "Accept-Encoding"
Disable STREAM profile for HTTP_REQUEST bodys
STREAM::disable
}
when HTTP_RESPONSE {
if { [HTTP::header value Content-Type] eq "text/html" } then {
Look for "" and replace with ""
STREAM::expression {@@@}
Enable STREAM profile for the received HTTP_RESPONSE content
STREAM::enable
}
}
Note: You may also add a [if] conditions in the HTTP_REQUEST event to apply the content replacement just for certain [HTTP::uri]'s.
Note: If you need to replace the entire ..... including the "....." portion, then please post the HTML code of the entirely. Depending on the existence of dynamic content, it could be required to use a [STREAM::match] syntax to peform more complex content replacements.
Note: Instead of removing the Accept-Encoding header during HTTP_REQUEST, you could also use a compression profile on your virtual server and make sure the "Keep Accept Encoding" option is disabled. This would allow you to still compress the content before sending it to the client.
Cheers, Kai
Recent Discussions
Related Content
* 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