1
0
Fork 0
forked from svrjs/svrjs

Fix static file served with wrong MIME type

This commit is contained in:
Dorian Niemiec 2024-08-26 13:48:58 +02:00
parent 4299a09c86
commit 5672c4a3d5

View file

@ -76,6 +76,7 @@ module.exports = (req, res, logFacilities, config, next) => {
let origHref = req.originalParsedURL.pathname;
let ext = href.match(/[^\/]\.([^.]+)$/);
if (!ext) ext = "";
else ext = ext[1].toLowerCase();
let dHref = "";
try {
dHref = decodeURIComponent(href);