Forum Discussion
cjunior
Apr 22, 2020Nacreous
Hello,
According to my understanding, could be this:
when HTTP_REQUEST {
if { [string tolower [HTTP::host]] contains "myhostname.society.com" && !( [HTTP::uri] contains "/pathA" || [HTTP::uri] contains "/pathB" || [HTTP::header Referer] contains "/pathA" || [HTTP::header Referer] contains "/pathB" ) } {
HTTP::respond 403
}
}
as well this one:
when HTTP_REQUEST {
if { [string tolower [HTTP::host]] contains "myhostname.society.com" } {
switch -glob [HTTP::path][HTTP::header Referer] {
"*/pathA*" -
"*/pathB*" { }
default { HTTP::respond 403 }
}
}
}
I hope it helps.