Ammar
Mar 26, 2022Nimbostratus
TCL error redirect if active_members == 0
Dear
when HTTP_REQUEST {
switch -glob -- [string tolower [HTTP::path]] {
"/dashboard/*" {
## dashboard
if { [active_members dashboard] == 0 }
{
log local0. "Pool dashboard donw"
HTTP::redirect "https://example.com"
}
pool /Common/dashboard
persist cookie insert
}
default {
reject
}
}
}
TCL error: /Common/dashboard_iRule <HTTP_REQUEST> - Can't call after responding - ERR_NOT_SUPPORTED (line 1) invoked from within "HTTP::uri" ("/dashboard/*" arm line 13) invoked from within "switch -glob -- [string tolower [HTTP::path]] { "/dashboard/*" { ##dashboard/Dsh/* pool /Common/dashboard ..."
Br