From 0fb9cce5ef12bdadbc5404c95116200daa178cfd Mon Sep 17 00:00:00 2001 From: philipp lang Date: Wed, 16 Nov 2022 23:24:07 +0100 Subject: [PATCH] dont redirect horizon requests --- app/Http/Middleware/RedirectIfNotInitializedMiddleware.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/Http/Middleware/RedirectIfNotInitializedMiddleware.php b/app/Http/Middleware/RedirectIfNotInitializedMiddleware.php index b22c4e97..d0e06028 100644 --- a/app/Http/Middleware/RedirectIfNotInitializedMiddleware.php +++ b/app/Http/Middleware/RedirectIfNotInitializedMiddleware.php @@ -23,6 +23,10 @@ class RedirectIfNotInitializedMiddleware return $next($request); } + if (1 === preg_match('/\/horizon/', $request->url())) { + return $next($request); + } + if ($this->initialized() && request()->routeIs(['initialize.form'])) { return redirect()->to(RouteServiceProvider::HOME); }