Forum Discussion
Thiyagu
May 06, 2021Cirrus
issue with an irule for validating host header and irule to insert the source IP address
Hello All, I'm working on an iRule to validate the host header refer value and to respond a 400 error message if the HTTP referer is not from the allowed list. iRule to validate the host heade...
May 06, 2021
Hi Thiyagu,
Can you try merging iRules?
when HTTP_REQUEST {
if { [class match [HTTP::header Referer] contains HTTP_REFERER_ALLOW_LIST] } {
HTTP::header insert "srcaddr" [IP::remote_addr]
}
else {
HTTP::respond 400 content "Bad Request" Content-Type "text/html"
}
}
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