CodeIgniter Forums
Exception in filters - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28)
+--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30)
+--- Thread: Exception in filters (/showthread.php?tid=90168)



Exception in filters - alice - 02-19-2024

Hello,
I have a route 'users/token' (among others) in a group route with filters. The group filters should not apply to this route but it does and i don't understand why :

Code:
$routes->group('users', ['filter' => ['tokens', 'group: superadmin']], static function ($routes) {
 
   $routes->post('token', 'UsersController::createToken');

});
Code:
public array $globals = [
        'before' => [
            'tokens' => ['except' => ['users/token']],
           
            'group' => ['except' => ['users/token']],
        ],
        'after' => [
           
        ],
    ];


The 'except' does not seem to work. why?