Yugandhar
Feb 02, 2019Nimbostratus
iRule to replace title of the html message
Hi,
Can we have the below iRule to replace the title header with a script in the HTML message.
when HTTP_REQUEST {
if {[HTTP::path] equals "https://abc.com/id/summary.html";} {
set token 1
}
else {
set token 0
}
Disable the stream filter for client requests.
STREAM::disable
HTTP::header remove "Accept-Encoding"
}
when HTTP_RESPONSE {
Disable the stream filter for all server responses
STREAM::disable
Inserts the necessary JavaScript for token
if {($token == 1) && ([HTTP::header "Content-Type"] starts_with "text/html")} {
STREAM::expression {
@@
;@}
Enable the stream filter for this response only
STREAM::enable
}
}