brianokelly_119
Mar 03, 2011Nimbostratus
iRule to serve image to user
Hi All,
We are trying to serve a 1MB image directly from a specific uri on a vip to test throughput up to the F5. As such we do not wish to put the base 64 encoded image data into the bigip.conf file, rather store it on the file system. I followed an example on the site but it does not seem to work (v10.2 on an 8900):
Class:
class logo_f5_class_t2 {
"filename" { "/var/class/f5.image.class" }
}
iRule:
when HTTP_REQUEST {
if {[HTTP::uri] eq "/preprodtestimage/image.jpg" }
{
HTTP::respond 200 content [b64decode [lindex $::logo_f5_class_t2 0]] "Content-Type" "image/jpg"
}
}
When loading the image directly in the response (b64 encoded) we have no issues. However, when we use the above we get page could not be displayed. Can anyone see anything obvious missing?