misc_pterodactyl-panel/app/Http/Middleware/Authenticate.php

23 lines
470 B
PHP
Raw Normal View History

<?php
namespace Pterodactyl\Http\Middleware;
2022-02-26 16:15:20 +00:00
use Illuminate\Auth\Middleware\Authenticate as Middleware;
2022-02-26 16:15:20 +00:00
class Authenticate extends Middleware
{
/**
2022-02-26 16:15:20 +00:00
* Get the path the user should be redirected to when they are not authenticated.
*
2022-02-26 16:15:20 +00:00
* @param \Illuminate\Http\Request $request
2017-11-03 23:16:49 +00:00
*
2022-02-26 16:15:20 +00:00
* @return string|null
*/
2022-02-26 16:15:20 +00:00
protected function redirectTo($request)
{
2022-02-26 16:15:20 +00:00
if (!$request->expectsJson()) {
return '/';
}
}
}