From bda42891a4b0c15d5dab5da8c53a006ddadccfb7 Mon Sep 17 00:00:00 2001 From: Dennis Koch Date: Mon, 12 Aug 2024 10:05:10 +0200 Subject: [PATCH] security: use signed middleware --- routes/web.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/routes/web.php b/routes/web.php index 7b46ce1..0c1d0ed 100644 --- a/routes/web.php +++ b/routes/web.php @@ -1,10 +1,17 @@ path($path); + $filename = substr($path, 37); + return response() - ->download(Storage::disk('filament-excel')->path($path), substr($path, 37)) + ->download($path, $filename) ->deleteFileAfterSend(); }) + ->middleware(['web', 'signed']) ->where('path', '.*') ->name('filament-excel-download');