Skip to content

Commit

Permalink
feat: add chunked transfer-encoding to allow streaming response
Browse files Browse the repository at this point in the history
  • Loading branch information
dsouza95 committed Jul 5, 2024
1 parent 03b8f74 commit 3baf234
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/backends/backend.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ Backend.prototype.serveAsset = function(asset, req, res) {
return d.promise;
}

res.header('Transfer-Encoding', 'chunked');
res.header('Content-Length', asset.size);
res.attachment(asset.filename);

Expand Down

0 comments on commit 3baf234

Please sign in to comment.