Implementing middleware and handling each request before consumed in controller is the best way to do it. Middlewares executions are the previous step of execution...