Michael Kennedy
2018-04-13 15:42:29 UTC
Hi,
I have a URL that contains a Unix hex timestamp (something like 5ace8c5d). The timestamp should be within X minutes of now, and is used as part of an access control mechanism. I want to do something like this:
if (std.time(req.http.x-hextime, now) < now - 1w) {
...
}
Is there an efficient way in VCL to either convert Hex to Dec so that this comparison can be done, or some other solution that does not involve changing the data in the URL.
Thanks,
Michael
I have a URL that contains a Unix hex timestamp (something like 5ace8c5d). The timestamp should be within X minutes of now, and is used as part of an access control mechanism. I want to do something like this:
if (std.time(req.http.x-hextime, now) < now - 1w) {
...
}
Is there an efficient way in VCL to either convert Hex to Dec so that this comparison can be done, or some other solution that does not involve changing the data in the URL.
Thanks,
Michael