1
0
Fork 0
forked from svrjs/svrjs

Convert a "bytes */" + filelen string to a template string

This commit is contained in:
Dorian Niemiec 2024-08-27 21:39:51 +02:00
parent 189fbdc617
commit 30498263fc

View file

@ -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]*)/,
);