mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-10-01 01:36:00 -04:00
Fixed bad /api docs redirection on sub path
Direct route redirect does not seem to go via standard URL generator so misses off generation via base URL.
This commit is contained in:
parent
e3c4a9d167
commit
f78c0635ee
@ -28,4 +28,12 @@ class ApiDocsController extends ApiController
|
||||
|
||||
return response()->json($docs);
|
||||
}
|
||||
|
||||
/**
|
||||
* Redirect to the API docs page.
|
||||
*/
|
||||
public function redirect()
|
||||
{
|
||||
return redirect('/api/docs');
|
||||
}
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ Route::middleware('auth')->group(function () {
|
||||
->where('path', '.*$');
|
||||
|
||||
// API docs routes
|
||||
Route::redirect('/api', '/api/docs');
|
||||
Route::get('/api', [ApiDocsController::class, 'redirect']);
|
||||
Route::get('/api/docs', [ApiDocsController::class, 'display']);
|
||||
|
||||
Route::get('/pages/recently-updated', [EntityControllers\PageController::class, 'showRecentlyUpdated']);
|
||||
|
Loading…
Reference in New Issue
Block a user