forked from svrjs/svrjs
Fix static file served with wrong MIME type
This commit is contained in:
parent
4299a09c86
commit
5672c4a3d5
1 changed files with 1 additions and 0 deletions
|
@ -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);
|
||||
|
|
Reference in a new issue