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'); } }