diff --git a/laravel/app/Http/Middleware/BasicAuthMiddleware.php b/laravel/app/Http/Middleware/BasicAuthMiddleware.php index bec6bbe..85aed56 100644 --- a/laravel/app/Http/Middleware/BasicAuthMiddleware.php +++ b/laravel/app/Http/Middleware/BasicAuthMiddleware.php @@ -9,6 +9,10 @@ class BasicAuthMiddleware { + protected $except = [ + 'health-check', + ]; + /** * Handle an incoming request. * @@ -18,6 +22,12 @@ class BasicAuthMiddleware */ public function handle(Request $request, Closure $next): Response|RedirectResponse { + foreach ($this->except as $except) { + if ($request->is($except)) { + return $next($request); + } + } + $username = $request->getUser(); $password = $request->getPassword();