From 4e75e4584d58980dc24c9aa27f5f96a84ffe73f9 Mon Sep 17 00:00:00 2001 From: Ron Melkhior Date: Wed, 26 Jul 2023 23:08:56 +0300 Subject: [PATCH] NovaSettingsProvider: use nova's domain --- src/NovaSettingsServiceProvider.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/NovaSettingsServiceProvider.php b/src/NovaSettingsServiceProvider.php index d5d93ab..b614f1a 100644 --- a/src/NovaSettingsServiceProvider.php +++ b/src/NovaSettingsServiceProvider.php @@ -59,12 +59,14 @@ protected function registerRoutes() $router ->get("{$path}/{pageId?}", fn ($pageId = 'general') => inertia('NovaSettings', ['basePath' => $path, 'pageId' => $pageId])) - ->middleware(['nova', Authenticate::class]); + ->middleware(['nova', Authenticate::class]) + ->domain(config('nova.domain', null)); }); if ($this->app->routesAreCached()) return; Route::middleware(['nova', Authorize::class, SettingsPathExists::class]) + ->domain(config('nova.domain', null)) ->group(__DIR__ . '/../routes/api.php'); } }