Skip to content
This repository was archived by the owner on Oct 20, 2025. It is now read-only.

Commit 52801c3

Browse files
committed
Fixes #368
1 parent 8173ce1 commit 52801c3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Http/SpladeMiddleware.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,11 @@ public function handle(Request $request, Closure $next)
7676
return $response;
7777
}
7878

79+
// Check if the response has a Content-Disposition header with a filename.
80+
if ($response->headers->has('Content-Disposition') && Str::contains($response->headers->get('Content-Disposition'), 'filename=')) {
81+
return $response;
82+
}
83+
7984
// This response should be ignored by Splade.
8085
if ($response->headers->has(SpladeCore::HEADER_SKIP_MIDDLEWARE)) {
8186
$response->headers->remove(SpladeCore::HEADER_SKIP_MIDDLEWARE);

0 commit comments

Comments
 (0)