CSP with Kirby - how to best generate a nonce?

That’s exactly the article that I had in mind when I wrote the message above. Yet, that’s probably the easy part.

Any idea on how to best pass around a HTTP request specific “variable” during HTML generation (without passing it around to templates and snippets as an argument/parameter)? I hope there’s a smarter choice than a global variable… any idea on what “hook” to link in to?