Forum Discussion
Wales_113331
Nimbostratus
Dec 26, 2017IFILE with non-html content
Hi Everyone,
I have a requirement to use the LB to load a pdf file as a response to particular URL. Would this be possible using an irule with an ifile combination. If so how would like.
We want to avoid having to build a VM just to serve a pdf file and considering the possibility of importing the pdf file unto the LTM can call it with an irule using the ifile.
- nitass
Employee
is this useful?
v11.1–External File Access from iRules via iFiles by Jason Rahm
This should get you going...
when HTTP_REQUEST { if { [HTTP::uri] eq "/example.pdf" } { HTTP::respond 200 content [ifile get testpdf] Content-Type "application/pdf" Cache-Control "max-age=0,must-revalidate" } }
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