Suri
Jun 27, 2023Altostratus
Help with K54399691 iRule
Hey everybody,
Maybe it's just me, but the phrasing in the K54399691 article makes my eyes cross... If I understand it correctly, I need to implement an iRule to capture the HTTP headers in a variable prior to APM processing, then pass the variable to the backend servers after APM allows access. I haven't had to write an iRule from scratch and frustratingly F5 doesn't provide any real guidance in the KB. This is probably a five minute fix, but I'm not at all confident what I'm trying to do is correct. With that in mind, the iRule below is likely wrong or they would have included something similar in the KB... Can anyone confirm whether I'm on the right track here or lend a hand getting me there? Any help is appreciated!
# When a POST is made, capture the original headers in "header" variable
when HTTP_REQUEST {
if {[HTTP::method] eq "POST"}{
set header [HTTP::header]
}
}
# When releasing the backend HTTP connection, send original headers
when HTTP_REQUEST_RELEASE {
set HTTP::header header
}