From 8967eeb7eac2a114282ff1d3039eb9608d8aecbf Mon Sep 17 00:00:00 2001 From: philipp lang Date: Mon, 5 Sep 2022 23:21:56 +0200 Subject: [PATCH] fix: allow telescope --- 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 637bf0ac..b22c4e97 100644 --- a/app/Http/Middleware/RedirectIfNotInitializedMiddleware.php +++ b/app/Http/Middleware/RedirectIfNotInitializedMiddleware.php @@ -19,6 +19,10 @@ class RedirectIfNotInitializedMiddleware */ public function handle($request, Closure $next) { + if (1 === preg_match('/\/telescope/', $request->url())) { + return $next($request); + } + if ($this->initialized() && request()->routeIs(['initialize.form'])) { return redirect()->to(RouteServiceProvider::HOME); }