Forum Discussion
Fred_01
Mar 27, 2018Nimbostratus
HTTP::Status after HTTP::respond
Hello
I have some issue with Irules
I have 2 irules:
- first irule specific to one VS who makes some filtering job, when i want block some request i do
when HTTP_REQUEST_SEND {
clientside {
HTTP::respond 403 -version "1.1" content "Request RejectedYou are not authorized to access this page" noserver Connection Close
}
}
- second irule who is generic to all VS who logs all traffic
when HTTP_RESPONSE_RELEASE {
set logTxt "$logTxt status=[HTTP::status]\n"
HSL::send $hsl $logTxt
}
The issue is that when i block some request with the http::respond, the status code in the second irules is 200
do you know how i can trap the 403 code generate with http::respond command
Thank you
For status code, check following note:
https://devcentral.f5.com/wiki/iRules.HTTP__status.ashx
example:
when HTTP_RESPONSE { if { [HTTP::status] == 404 } { HTTP::redirect "; } }
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