fix(routes): local API docs not available on domain or IP

This commit is contained in:
peaklabs-dev
2025-01-22 12:51:46 +01:00
parent 52a38f238b
commit a8b5f6befc

View File

@@ -81,7 +81,7 @@ use Symfony\Component\HttpFoundation\StreamedResponse;
use ThreeSidedCube\LaravelRedoc\Http\Controllers\DefinitionController; use ThreeSidedCube\LaravelRedoc\Http\Controllers\DefinitionController;
use ThreeSidedCube\LaravelRedoc\Http\Controllers\DocumentationController; use ThreeSidedCube\LaravelRedoc\Http\Controllers\DocumentationController;
Route::group(['middleware' => ['auth:sanctum', ApiAllowed::class]], function () { Route::middleware(['auth', ApiAllowed::class])->group(function () {
Route::get('/docs/api', DocumentationController::class)->name('redoc.documentation'); Route::get('/docs/api', DocumentationController::class)->name('redoc.documentation');
Route::get('/docs/api/definition', DefinitionController::class)->name('redoc.definition'); Route::get('/docs/api/definition', DefinitionController::class)->name('redoc.definition');
}); });