Hi
Try something like this...
when RULE_INIT {
# 0 - log off
# 1 - log on
set static::debug_user_cod 0
}
when HTTP_REQUEST {
if { $static::debug_user_cod } {
set USER_COD [HTTP::header value "USER_COD"]
}
#Switch through the values of header USER_COD. If a value matches then send to appropiate pool
#if no value matches,including value PRINT or a null value then send to default pool
switch -glob [string tolower [HTTP::header value "USER_COD"]] {
"dg_01" {pool POOL_DG_01}
"dg_02" {pool POOL_DG_02}
"dg_03" {pool POOL_DG_03}
"dg_04" {pool POOL_DG_04}
"dg_05" {pool POOL_DG_05}
"dg_06" {pool POOL_DG_06}
"dg_07" {pool POOL_DG_07}
default {pool POOL_DEFAULT
if { $static::debug_user_cod } {
log local0. "----------------------------------------"
log local0. "src: [IP::client_addr] URL -> [HTTP::host][HTTP::uri] (REQUEST)"
log local0. "Value get on USER_COD: $USER_COD"
log local0. "----------------------------------------"
}
}
}
}
when SERVER_CONNECTED {
if { $static::debug_user_cod } {
log local0. "----------------------------------------"
log local0. "src: [IP::local_addr] - Dst Member: [IP::remote_addr] - USER_COD: $USER_COD"
log local0. "----------------------------------------"
}
}