diff --git a/src/Support/HealthzServiceProvider.php b/src/Support/HealthzServiceProvider.php index 745ea40..4659023 100644 --- a/src/Support/HealthzServiceProvider.php +++ b/src/Support/HealthzServiceProvider.php @@ -51,8 +51,8 @@ protected function healthzUIHandler() $password = getenv('HEALTHZ_PASSWORD'); if ($username != "") { if ( - request()->getUser() !== $username || - request()->getPassword() !== $password + array_get($_SERVER, 'PHP_AUTH_USER') !== $username || + array_get($_SERVER, 'PHP_AUTH_PW') !== $password ) { return response('Invalid credentials', 401, ['WWW-Authenticate' => 'Basic']); }