Hi!
How can i check dynamic route for JWT? For example. We have routes which need to ignored for JWT
$di->set('routeIgnore', function() {
return array(
'/v1/auth',
'/v1/logins'
);
});
I mean, https://localhost/v1/logins - OK, how can i add dynamic routes like this https://localhost/v1/logins/[0-9]
This is my check code for JWT
if(!in_array($app->router->getRewriteUri(), $app->routeIgnore) && $app->jwtEnabled) {
if(!$app->request->getHeader('Authorization')) {
error
...
}
...
}
Is any way to add dynamic route like this
$di->set('routeIgnore', function() {
return array(
'/v1/auth',
'/v1/logins/[0-9]' <---- it's doesn't work
);
});