mirror of
https://github.com/Bubka/2FAuth.git
synced 2025-08-17 09:01:06 +02:00
Refactor routes rejection using middlewares
This commit is contained in:
@ -6,7 +6,6 @@ use App\Http\Controllers\Controller;
|
||||
use DarkGhostHunter\Larapass\Http\SendsWebAuthnRecoveryEmail;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
use App\Exceptions\UnsupportedWithReverseProxyException;
|
||||
|
||||
class WebAuthnDeviceLostController extends Controller
|
||||
{
|
||||
@ -23,19 +22,6 @@ class WebAuthnDeviceLostController extends Controller
|
||||
|
|
||||
*/
|
||||
|
||||
/**
|
||||
* Create a new controller instance.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$authGuard = config('auth.defaults.guard');
|
||||
|
||||
if ($authGuard === 'reverse-proxy-guard') {
|
||||
throw new UnsupportedWithReverseProxyException();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* The recovery credentials to retrieve through validation rules.
|
||||
*
|
||||
|
Reference in New Issue
Block a user