(05-29-2021, 12:25 PM)includebeer Wrote: Don't use a constructor. Override initController(), don't forget to call parent::initController(), and then do what you need to do.
But, a better approach, would be to create a filter and do your redirect in it.
Is this the CI4 Way to use a constructor? I had the problem to access the request object in the constructor and got another solution here in the forum. You can call the request class with a service in the __construct method. I don't know if there are problems if the request class is called again in the initController method.