Skip to content

Commit b24f6e0

Browse files
committed
files that are prompted for download will now have a correct filename
1 parent 7d8abc9 commit b24f6e0

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/Plugin/HeaderRewritePlugin.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ function onHeadersReceived(ProxyEvent $event){
4949
}
5050
}
5151

52+
if(!$response->headers->has('content-disposition')){
53+
$response->headers->set('Content-Disposition', 'filename="'.basename($request_url).'"');
54+
}
55+
5256
// do not ever cache our proxy pages!
5357
$response->headers->set("cache-control", "no-cache, no-store, must-revalidate");
5458
$response->headers->set("pragma", "no-cache");

0 commit comments

Comments
 (0)