Forum Discussion
Sectively compression for url using “*.uif”.
Hi all,
I need help on writing iRule for selectively compressing as in the below. This is one of acceleration requirements from an liability insurance company for mobile T/F(migrating core insurance system for mobile users).
1) Compress all HTTP responses except for compressed contents such as images.
2) Selectively compress for url using “*.uif”.
a) If content-encoding of HTTP response is “gzip”, then no compression needed.
b) Compress all others.
My first answers:
Must set the Compression to "Selective" in the profile
rule selective_compress_enable {
when HTTP_REQUEST {
if { ([HTTP::uri] eq "*.uif") and ([HTTP::header value Content-Encoding] eq "gzip") } {
log local0. "compression_rule_disable : *.uif & gzip"
COMPRESS::disable
}
else {
COMPRESS::enable
}
}
}
I am very new to iRule and I'd like to have help on this.
Thanks in advance,
Neo
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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