Welcome Guest, Not a member yet? Register   Sign In
'Improved' Auto Router exception skips filter for 404 controller
#6

Okay, I got the situation.

As you said, when auto routing legacy is enabled, global filters are executed
if the URI segment for the controller name is valid as a classname.
It does not matter whether you useĀ 404 override or not.

But as I wrote, if we navigate to http://localhost:8080/404, "404" is not a valid
classname. So filters are not executed.

I think this is a bug. At least they are not consistent.
I created an issue:
https://github.com/codeigniter4/CodeIgni...ssues/7205

I think controller filters should be executed only when the route exists.
Reply


Messages In This Thread
RE: 'Improved' Auto Router exception skips filter for 404 controller - by kenjis - 01-31-2023, 06:21 PM



Theme © iAndrew 2016 - Forum software by © MyBB