mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
2fa not all routes have names (#14311)
This commit is contained in:
@@ -21,7 +21,8 @@ class VerifyTwoFactor
|
||||
// check twofactor
|
||||
if (Config::get('twofactor') === true) {
|
||||
// don't apply on 2fa checking routes
|
||||
if (Str::startsWith($request->route()->getName(), '2fa.')) {
|
||||
$route_name = $request->route()->getName();
|
||||
if ($route_name && Str::startsWith($route_name, '2fa.')) {
|
||||
return $next($request);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user