brad9iner_11512
Feb 08, 2017Altostratus
iRule to log how many requests are being caught by existing iRule
So I have an existing iRule that handles some redirecting of a specific context path over to the root context path:
when HTTP_REQUEST {
set context_root "/audit"
if { [HTTP::path] starts_with $context_root } {
switch [HTTP::path] {
"/audit" {
HTTP::uri "/?[HTTP::query]"
HTTP::path "/"
}
default {
set substr_uri [substr [HTTP::uri] [string length $context_root]]
set substr_path [substr [HTTP::path] [string length $context_root]]
HTTP::uri $substr_uri
HTTP::path $substr_path
}
}
}
}
What I am wanting to capture are the source IPs of requests that are coming in with that /audit context path. Is it possible to add in some HSL to this existing iRule? Or would it be better to create a new HSL iRule to capture that traffic first before it gets captured by the above iRule?