Forum Discussion
PeteWhite
Employee
when HTTP_REQUEST {
if { [HTTP::host] == "hostname.mylab.com" } {
switch -- [HTTP::path] {
"/dir1" -
"/dir2" -
"/dir3" -
"/dir4" -
default { drop }
}
} else {
drop
}
}
Haroonh
Jun 23, 2020Nimbostratus
Thanks Pete for the reply and your time, really appreciate it.
I have tried your solution but it doesn't seem to work,
I implemented the following which went fine.
when HTTP_REQUEST {
if { (([HTTP::host] eq "hostname.mylab.com") and ([HTTP::uri] contains "/dir1"))
or (([HTTP::host] eq "hostname.mylab.com") and ([HTTP::uri] contains "/dir2"))
or (([HTTP::host] eq "hostname.mylab.com") and ([HTTP::uri] contains "/dir3"))
or (([HTTP::host] eq "hostname.mylab.com") and ([HTTP::uri] contains "/dir4")) } {
} else {
drop
}
}
Kind Regards,