For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

JP_42120's avatar
JP_42120
Icon for Nimbostratus rankNimbostratus
Nov 09, 2012

HSL -logging various HTTP::Header values

 

Hi, i am trying to capture the "X-Forwarded-For" and other header info in this High Speed Logging iRule but not sure if it's going to work.

 

 

 

when CLIENT_ACCEPTED {

 

set hsl [HSL::open -proto UDP -pool syslog_server_pool] }

 

 

when HTTP_REQUEST {

 

if { [HTTP::header exists "Content-Length"]} {

 

HSL::send $hsl "<190> Virtual: [virtual name], IP: [IP::client_addr], Method: [HTTP::method], XFF: [HTTP::header X-Forwarded-For], Content-Type: [HTTP::header Content-Type], Content-length: [HTTP::header Content-Length] for [HTTP::uri]"

 

}

 

}

 

 

thanks!

 

4 Replies

  • Based on what I can find on the iRules wiki, it looks good, although you may want a \n at the end of your text.
  • hoolio's avatar
    hoolio
    Icon for Cirrostratus rankCirrostratus
    You could also use [HTTP::header values X-Forwarded-For] in case there are multiple XFF headers in the request.

     

     

    Aaron