Forum Discussion
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
}
}
- Rico
Cirrus
Is this iRule not working? What is your question exactly?
- Yugandhar
Nimbostratus
Hi Rico,
I wanted to verify whether the code after the stream::expression is valid or not ?.
Thanks,
Yugandhar.
- Samir_Jha_52506
Noctilucent
Can you give us some clue about requirements?
- Yugandhar
Nimbostratus
Hi Samir,
Want the title in the HTTP response be replaced with a custom message
Thanks,
Yugandhar.
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