André_Amaro_215
Jan 11, 2019Nimbostratus
How to limit access by time?
Dear community,
I need to handle requests for a particular domain in a different way. I usually apply a few simple conditions, for example, requests must arrive with the xpto.com header to be forwarded to the pool.
- I use a BIG-IP LTM 13.0.0.
From what I've been researching I believe that the FLOW_INIT function helps me with what I need, but I still can not reach my goal.
Below is a simple example of what I use to test:
when HTTP_REQUEST {
if {[HTTP::host] equals "drop.test:8080"} {
switch -glob [HTTP::uri] {
"/test/*" {
log local0. "/test/ - accept - source: [IP::remote_addr] - uri: [HTTP::host][HTTP::uri]"
HTTP::respond "Test ok!"
}
"/drop/*" {
log local0. "/drop/ - accept - source: [IP::remote_addr] - uri: [HTTP::host][HTTP::uri]"
HTTP::respond "Drop ok!"
}
default {
log local0. "reject - source: [IP::remote_addr] - uri: [HTTP::host][HTTP::uri]"
reject
}
}
}
}