Forum Discussion
2 Replies
Sort By
- DanielseyoumAltostratusTry the getfield command:
- Erick_Hammersm1Historic F5 AccountThanks for the replies. Unfortunately, [HTTP::header] isn't valid syntax. You have to pass it the name of the header you want to process, and it only ever returns the first header with that name (this was resolved in v9.4 with "HTTP::header values", which returns all values for a header). If I was using v9.2, I could use "HTTP::request" to get the whole request and parse out the headers I'm looking for, but I need a solution for v9.1.2.
when HTTP_REQUEST { if { [HTTP::header exists X-Forwarded-For] } { HTTP::header insert Akamai-Peer-IP [IP::remote_addr] } else { HTTP::header insert X-Forwarded-For [IP::remote_addr] } }