Forum Discussion
TMaCEvans_92750
Jan 17, 2011Nimbostratus
sorry to clear up the nested if statement to start with
not all the traffic that goes to this application that uses websockets requires HTTP::disable thus the nested if
have added a few comments below
[codewhen HTTP_REQUEST {
check is for websocket server (if it is then check if it is websocket if so disable HTTP then pass to pool3 else leave alone and pass to pool3)
if { [URI::path [HTTP::path]] starts_with "/xyz/" || [HTTP::query] contains "xy=9" } {
check is web socket
if { [HTTP::method] equals "GET" && [HTTP::header exists "Upgrade"] && [HTTP::header Upgrade] contains "WebSocket" } {
disbale http for websocket traffic
HTTP::disable
}
send to pool3
pool pool3
check which country it is for and send to coresponding server
} elseif { switch -glob [string tolower [HTTP::uri]] {
"/fr/app*" { pool pool2 }
default { pool Pool1 }
}
} else {
if it doesnt meet any of that criteria send to pool1
pool pool1
}
}