Forum Discussion
Mike_Graston_10
Nimbostratus
Mar 13, 2007401 response with message and logging
I have a scenerio where I am not sure on how to do this. I would like to filter a uri that contains the string /abc. Any ip address that hits it I would like to log and send back a 401 Unauthorized pa...
Mike_Graston_10
Nimbostratus
Mar 13, 2007So let me get this right, The log will only populate if the condition is met as containing /abc.
when HTTP_REQUEST {
if { [string tolower [HTTP::uri]] contains "/abc"} {
log local0. "Client IP is [IP::client_addr]"
HTTP::respond 401
TCP::close
}
}
Can I add to the 401 page so that the client sees the message - Your IP address "[IP::client_addr]" has been logged?
Also if the condition is met I would like to terminate the session?
Also you said it would go to the virtual server then to be processed normally?
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects