Update all the middlewares
This commit is contained in:
parent
e0d03513e4
commit
79decafdc8
16 changed files with 161 additions and 100 deletions
|
@ -33,9 +33,12 @@ use Pterodactyl\Exceptions\Repository\RecordNotFoundException;
|
|||
class DaemonAuthenticate
|
||||
{
|
||||
/**
|
||||
* Daemon routes that this middleware should be skipped on.
|
||||
* @var array
|
||||
*/
|
||||
protected $except = ['daemon.configuration'];
|
||||
protected $except = [
|
||||
'daemon.configuration',
|
||||
];
|
||||
|
||||
/**
|
||||
* @var \Pterodactyl\Contracts\Repository\NodeRepositoryInterface
|
||||
|
@ -63,6 +66,10 @@ class DaemonAuthenticate
|
|||
*/
|
||||
public function handle(Request $request, Closure $next)
|
||||
{
|
||||
if (in_array($request->route()->getName(), $this->except)) {
|
||||
return $next($request);
|
||||
}
|
||||
|
||||
$token = $request->bearerToken();
|
||||
|
||||
if (is_null($token)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue