Skip to content

Commit 5651d9a

Browse files
committed
Fix authentication code for daemon requests.
1 parent 4205213 commit 5651d9a

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

app/Http/Middleware/DaemonAuthenticate.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,15 @@ class DaemonAuthenticate
3737
*/
3838
protected $auth;
3939

40+
/**
41+
* An array of route names to not apply this middleware to.
42+
*
43+
* @var array
44+
*/
45+
protected $except = [
46+
'daemon.configuration',
47+
];
48+
4049
/**
4150
* Create a new filter instance.
4251
*
@@ -57,6 +66,10 @@ public function __construct(Guard $auth)
5766
*/
5867
public function handle($request, Closure $next)
5968
{
69+
if (in_array($request->route()->getName(), $this->except)) {
70+
return $next($request);
71+
}
72+
6073
if (! $request->header('X-Access-Node')) {
6174
return abort(403);
6275
}

0 commit comments

Comments
 (0)