From 30498263fc3d79e5a609cc294e0cf23567f04007 Mon Sep 17 00:00:00 2001 From: Dorian Niemiec Date: Tue, 27 Aug 2024 21:39:51 +0200 Subject: [PATCH] Convert a "bytes */" + filelen string to a template string --- src/middleware/staticFileServingAndDirectoryListings.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/middleware/staticFileServingAndDirectoryListings.js b/src/middleware/staticFileServingAndDirectoryListings.js index 2f4e8b0..bea1530 100644 --- a/src/middleware/staticFileServingAndDirectoryListings.js +++ b/src/middleware/staticFileServingAndDirectoryListings.js @@ -162,7 +162,7 @@ module.exports = (req, res, logFacilities, config, next) => { try { let rhd = config.getCustomHeaders(); rhd["Accept-Ranges"] = "bytes"; - rhd["Content-Range"] = "bytes */" + filelen; + rhd["Content-Range"] = `bytes */${filelen}`; const regexmatch = req.headers["range"].match( /bytes=([0-9]*)-([0-9]*)/, );