Skip to content

Commit

Permalink
Merge pull request #170 from RonMelkhior/main
Browse files Browse the repository at this point in the history
Use Nova's domain support
  • Loading branch information
Tarpsvo authored Aug 10, 2023
2 parents c6808e1 + 4e75e45 commit 0f5d94a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/NovaSettingsServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
}

0 comments on commit 0f5d94a

Please sign in to comment.