Forum Discussion
Lee_Sutcliffe
Sep 27, 2017Nacreous
F5 is a full TCP proxy, so by default will only forward status codes as sent by the backend servers/pool members. You can of course modify these or create custom status codes with an iRule dependent on your requirements
For example:
when HTTP_REQUEST {
if {YOUR-CLIENT-CLOSE-CONDITION} {
HTTP::respond "499" -version 1.1 content "Some Content"
}
}
In your case you could read the client close on HTTP_REQUEST and respond with the desired status code. As this is on HTTP_REQUEST, it will respond with the defined status code and bypass load balancing to the backend server.
https://devcentral.f5.com/wiki/iRules.HTTP__respond.ashx