From 84098f5141b0b3d0dd0d64f508f179bd16a4f5bc Mon Sep 17 00:00:00 2001 From: yuta Date: Mon, 25 Dec 2023 11:22:07 +0900 Subject: [PATCH] proxy in download paper pdf --- laravel/app/Http/Middleware/BasicAuthMiddleware.php | 10 ++++++++++ 1 file changed, 10 insertions(+) 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();