]> BookStack Code Mirror - bookstack/blobdiff - routes/web.php
Added ability to secure images behind auth
[bookstack] / routes / web.php
index 5ddb3fb940a0368ee631098f082d8c22fa8adceb..06805714d7b644bf3beff65699c8b0473d6df315 100644 (file)
@@ -5,6 +5,9 @@ Route::get('/translations', 'HomeController@getTranslations');
 // Authenticated routes...
 Route::group(['middleware' => 'auth'], function () {
 
+    Route::get('/uploads/images/{path}', 'ImageController@showImage')
+        ->where('path', '.*$');
+
     Route::group(['prefix' => 'pages'], function() {
         Route::get('/recently-created', 'PageController@showRecentlyCreated');
         Route::get('/recently-updated', 'PageController@showRecentlyUpdated');