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...
Ilian_Ivanov
Nimbostratus
Jun 06, 2017Hello,
You can use that code:
when CLIENT_ACCEPTED {
set time [clock format [clock seconds] -format "%d/%b/%Y:%H:%M:%S %z"]
}
when HTTP_REQUEST {
HTTP::header insert "X-Time" "$time"
}
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