Forum Discussion
How to redirect or change content in an iFrame
Getting out of or enlarging an iFrame are generally client side HTML/JavaScript processes - the browser has to do it. I think you have a few options here:
-
You could potentially modify the iFrame's dimensions as the (parent) page that defines it passes through the F5. This could make the iFrame larger, but also potentially mess up the intended layout of the page.
-
You could add some JavaScript to the iFrame response that tells it to break out. Something like this:
Probably the easiest way to do this is with a STREAM profile. Add a blank STREAM profile to the virtual server configuration and this iRule (modify as required):
when HTTP_REQUEST {
STREAM::disable
HTTP::header remove "Accept-Encoding"
if { [string tolower [HTTP::uri]] starts_with "/public2" } {
set add_iframe_breaker 1
}
}
when HTTP_RESPONSE {
if { ( [info exists add_iframe_breaker] ) and ( [HTTP::header value Content-Type] contains "text" ) } {
unset add_iframe_breaker
STREAM::expression {@@@}
STREAM::enable
}
}
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