]> BookStack Code Mirror - bookstack/blobdiff - app/Exports/Controllers/BookExportController.php
Merge pull request #5731 from BookStackApp/lexical_jul25
[bookstack] / app / Exports / Controllers / BookExportController.php
index 184f7c2350e62d75df3dd384dde642c5c26b2b61..67247598c318b8e8de6e681994b5a4c9190c8c71 100644 (file)
@@ -16,6 +16,7 @@ class BookExportController extends Controller
         protected ExportFormatter $exportFormatter,
     ) {
         $this->middleware('can:content-export');
+        $this->middleware('throttle:exports');
     }
 
     /**
@@ -75,6 +76,6 @@ class BookExportController extends Controller
         $book = $this->queries->findVisibleBySlugOrFail($bookSlug);
         $zip = $builder->buildForBook($book);
 
-        return $this->download()->streamedFileDirectly($zip, $bookSlug . '.zip', filesize($zip), true);
+        return $this->download()->streamedFileDirectly($zip, $bookSlug . '.zip', true);
     }
 }