Forum Discussion
Apply an iRule for only a specific pool from a VS
Hi,
I need to apply this iRule to a specific pool, but do not want to impact the other pools in my VS :
when HTTP_REQUEST {
STREAM::disable HTTP::header remove "Accept-Encoding" } when HTTP_RESPONSE {
if {[HTTP::header value Content-Type] contains "text"}{
STREAM::expression {@http://@https://@}
STREAM::enable
} }
Can we do it from the webgui ? Or should i add a specific line in my iRule to apply it only on this URL : "alfons-pp.domain.com"
2 Replies
- Vijay_E
Cirrus
You are better off using an if-condition for specific domain - alfons-pp.domain.com
gives you the pool of the currently selected member. You can probably use an if-condition to activate the iRule if specific pool is selected, if you are looking for a possible alternate option.LB::server pool - Stanislas_Piro2
Cumulonimbus
Hi,
you can set a variable to define you want the stream to apply:
when HTTP_REQUEST { STREAM::disable if { [HTTP::host] eq "alfons-pp.domain.com" } { set stream_string {@http://@https://@} HTTP::header remove "Accept-Encoding" } } when HTTP_RESPONSE { if { ([HTTP::header value Content-Type] contains "text") and [info exists stream_string]} { STREAM::expression $stream_string STREAM::enable } }
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
