Forum Discussion
sukru_isik_8872
Nimbostratus
Nov 22, 2012gzip filter
I want to filter gzip requests.if http requests have gzip ,I want to login server.Otherwise don't login .
I write an irule like down but it isn't working.what changes I have to do?
...
What_Lies_Bene1
Cirrostratus
Nov 22, 2012More brackets around the if might also help;
when HTTP_REQUEST {
if { (([string tolower [HTTP::header Accept-Encoding] contains "gzip"]) or ([string tolower [HTTP::header Accept-Encoding] contains "deflate"])) } {
pool Test_pool
log local0. "Compression enabled, request has been routed [HTTP::header "Accept-Encoding"]"
return
}
else {
HTTP::respond 500 Content "PLEASE SEND A GZIP ENABLED REQUEST" noserver Content-Type "text/html" Connection "Close"
log local0. "Compression disabled, request has NOT been routed [HTTP::header "Accept-Encoding"]: "
}
}
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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
