Forum Discussion
Dan44
Altostratus
Apr 27, 2021Generate a unique ID with the help of an iRule
Hello everyone I would like to generate a unique ID with the help of an iRule and place it in a header. The goal is to identify the HTTP request by the ID. Has anyone done something like this befo...
Rob_Stonham
Cirrus
Apr 27, 2021Dan44,
I'm not sure about generating the unique ID, I'd look at this article https://devcentral.f5.com/s/articles/random-string-generators or keep it simple and generate an id like Kai Wilke suggested in https://devcentral.f5.com/s/question/0D51T00006i7W29/how-random-is-rand
set uniqueID [TMM::cmp_unit][clock clicks]Your code also allows a client to supply the header X-Request-ID, is this intended behaviour?
Rob
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