On 5/31/23 20:06, Uday Kumar wrote:
We would like to configure varnish to create unique parameter such that its value should be of 20 characters (alphanumeric characters that are URL safe).
I have used VMOD uuid to set unique values in each request: https://github.com/otto-de/libvmod-uuidThe standard UUID string is 36 characters long. If you really have to have exactly 20 characters, you could take the last 3 blocks of hex characters, removing the hyphens. It would take a bit of regex slinging.
For example from: 6ba7b810-9dad-11d1-80b4-00c04fd430c8 extract: 11d180b400c04fd430c8Then you'd have 80 bits represented in 20 hex characters, instead of the 128 bits represented by the standard string. The 80 bits are all obtained from the random number generator (the urandom device on Linux), so I suppose that would be enough to ensure uniqueness.
Best, Geoff -- ** * * UPLEX - Nils Goroll Systemoptimierung Scheffelstraße 32 22301 Hamburg Tel +49 40 2880 5731 Mob +49 176 636 90917 Fax +49 40 42949753 http://uplex.de
OpenPGP_signature
Description: OpenPGP digital signature
_______________________________________________ varnish-misc mailing list [email protected] https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
