mirror of
https://github.com/BookStackApp/BookStack.git
synced 2026-05-04 18:08:46 +03:00
Themes: Added route to serve public theme files
Allows files to be placed within a "public" folder within a theme directory which the contents of will served by BookStack for access. - Only "web safe" content-types are provided. - A static 1 day cache time it set on served files. For #3904
This commit is contained in:
@@ -13,12 +13,14 @@ use BookStack\Permissions\PermissionsController;
|
||||
use BookStack\References\ReferenceController;
|
||||
use BookStack\Search\SearchController;
|
||||
use BookStack\Settings as SettingControllers;
|
||||
use BookStack\Theming\ThemeController;
|
||||
use BookStack\Uploads\Controllers as UploadControllers;
|
||||
use BookStack\Users\Controllers as UserControllers;
|
||||
use Illuminate\Session\Middleware\StartSession;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
use Illuminate\View\Middleware\ShareErrorsFromSession;
|
||||
|
||||
// Status & Meta routes
|
||||
Route::get('/status', [SettingControllers\StatusController::class, 'show']);
|
||||
Route::get('/robots.txt', [MetaController::class, 'robots']);
|
||||
Route::get('/favicon.ico', [MetaController::class, 'favicon']);
|
||||
@@ -360,8 +362,12 @@ Route::post('/password/email', [AccessControllers\ForgotPasswordController::clas
|
||||
Route::get('/password/reset/{token}', [AccessControllers\ResetPasswordController::class, 'showResetForm']);
|
||||
Route::post('/password/reset', [AccessControllers\ResetPasswordController::class, 'reset'])->middleware('throttle:public');
|
||||
|
||||
// Metadata routes
|
||||
// Help & Info routes
|
||||
Route::view('/help/tinymce', 'help.tinymce');
|
||||
Route::view('/help/wysiwyg', 'help.wysiwyg');
|
||||
|
||||
// Theme Routes
|
||||
Route::get('/theme/{theme}/{path}', [ThemeController::class, 'publicFile'])
|
||||
->where('path', '.*$');
|
||||
|
||||
Route::fallback([MetaController::class, 'notFound'])->name('fallback');
|
||||
|
||||
Reference in New Issue
Block a user