The onRequest hook is called with every top-level request in a site. This happens both for requests to cached and non-cached pages. For performance reasons the hook function should be kept short.
Methods
(static) onRequest()
The onRequest hook function.