Security headers irule issue
Hi there, i have been trying to apply an Irule to block requests for a URL when the domain is other than the ones allowed in the below rule,
when HTTP_REQUEST {
switch -glob [HTTP::header "Referer"]|[HTTP::header "Origin"]|[HTTP::header "X-Forwarded-Host"] {
"xxxx.net" -
"xxxx.com"
pool emx-pool
}
default { HTTP::respond 200 content "
<HTML>
<HEAD>
<TITLE>Rejected Request</TITLE>
</HEAD>
<BODY>The request was rejected. <BR>The server is trying to redirect the client to an external site, but it is forbidden</BODY>
</HTML>"
}
}
}
=========================
The issue is, even when i am part of xxxx.net domain, i am not being sent to the default pool and keeps on hitting the rejected message body, can someone review this please?