Forum Discussion
GBurch
Nov 09, 2017Altostratus
Add banner to HTML Pages with no control over HTTP code
I'm quite new to iRules, but I have a requirement to have the F5 add a banner message at the top of certain webpages. We aren't able to modify the source HTML of the pages though. Is this possible ...
Lee_Sutcliffe
Nov 09, 2017Nacreous
Yes, you can do this with a stream profile. You will need to identify where in the HTML code you want to insert the banner by defining what you have currently and what you want it to be.
Below is a very basic example but might give you an idea on where to start.
when HTTP_REQUEST {
STREAM::disable
set originalHTML ""
set newHTML ""
}
when HTTP_RESPONSE {
STREAM::expression "@$originalHTML@$newHTML@"
STREAM::enable
}
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