Forum Discussion
pinkzeppelin_26
Nimbostratus
Jun 06, 2017Inserting timestamp to HTTP header
Hello,
I would like to insert HTTP header value that reflects the current time of the requested connection and send it to backend servers.
I need help for inserting timestamp and the time f...
jacky_worne_346
Nimbostratus
Jan 10, 2018when HTTP_REQUEST { set secs [clock seconds] set msec [clock clicks -milliseconds] set base [expr { $secs * 1000 } ] set fract [expr { $msec - $base }] if { $fract >= 1000 } { set diff [expr { $fract / 1000 }] incr secs $diff incr fract [expr { -1000 * $diff }] } set time [clock format $secs -format "%d/%b/%Y:%H:%M:%S.$fract,000 %Z"] HTTP::header replace "X-Time" "$time" } you can use this code. PSD to Wordpress Conversion Service
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