Forum Discussion
Lee_Sutcliffe
Mar 20, 2018Nacreous
Hi Assad,
If your URLs are unique per client as you say, they you could use a datagroup to maintain an index of client name and URI and use the
-value
switch to return the client name.
E.g.
Datagroup:
ltm data-group internal client_uri_dg {
records {
/somepath/unique-field1 {
data "client-1"
}
/somepath/unique-field2{
data "client-2"
}
}
type string
}
iRule
when HTTP_REQUEST {
if {[class match [HTTP::uri] starts_with client_uri_dg} {
set clientName [class match -value [HTTP::uri] starts_with client_uri_dg]
log local0. "Request from client: $clientName"
}
}