Skip to content

Handle onRequest only on REST Requests

Currently the onRequest Event is handled for ALL request (see source code).
This is an unnecessary workload as the handling is only required on requests towards the REST API.

A function like isRestRequestEvent in the quiqqer/rest-auth-token package could be used to check if it's a REST request.

We may also consider introducing a function or global constant like this in the quiqqer/rest package.
This way not every package would have to do that check itself.