cancel
Showing results for 
Search instead for 
Did you mean: 
Login & Join the DevCentral Connects Group to watch the Recorded LiveStream (May 12) on Basic iControl Security - show notes included.
raj_77723
Nimbostratus
Nimbostratus

How to use this snippet:

when RULE_INIT {

set static::new_app_nodes "1.1.1.1 443 2.2.2.2 443 3.3.3.3 443" 

}

when HTTP_REQUEST_SEND {

if { $static::new_app_nodes contains "[LB::server addr] [LB::server port]" } then {

    log -noname local0.debug "Match! [members -list $static::new_app_nodes] contains [LB::server addr] [LB::server port]"

    clientside {

        HTTP::uri "/uri"

    }

} else {

    log -noname local0.debug "Don't match! [members -list $static::new_app_nodes] contains [LB::server addr] [LB::server port]"

}

}

Code :

when RULE_INIT {

    set static::new_app_nodes "1.1.1.1 443 2.2.2.2 443 3.3.3.3 443" 

}

when HTTP_REQUEST_SEND {

    if { $static::new_app_nodes contains "[LB::server addr] [LB::server port]" } then {

        log -noname local0.debug "Match! [members -list $static::new_app_nodes] contains [LB::server addr] [LB::server port]"

        clientside {

            HTTP::uri "/uri"

        }

    } else {

        log -noname local0.debug "Don't match! [members -list $static::new_app_nodes] contains [LB::server addr] [LB::server port]"

    }

}

Tested this on version:

11.4
Version history
Last update:
‎16-Feb-2016 00:04
Updated by:
Contributors