Forum Discussion
PeteWhite
Nov 28, 2018Employee
Yes, that iRule should do the job although it is a little blunt. You also want to consider whether contains is good enough or you should have exact matching.
Logging can be done locally to /var/log/ltm with the log command eg
log local0.debug "User Agent: [HTTP::header user-agent]"
but ideally you would do regular logging to a remote server via HSL.
You may also want to check if the User-Agent header exists - note that HTTP headers are non case sensitive.