Поправлена отдача статики

This commit is contained in:
Book Pauk
2022-11-09 23:58:08 +07:00
parent ffc65ab944
commit 8ee1b98a12

View File

@@ -189,9 +189,7 @@ function initStatic(app, config) {
return next();
}
if (path.extname(req.path) == '.json')
return next();
if (path.extname(req.path) == '') {
const bookFile = `${config.publicFilesDir}${req.path}`;
const bookFileDesc = `${bookFile}.json`;
@@ -215,6 +213,7 @@ function initStatic(app, config) {
if (downFileName)
res.downFileName = downFileName;
}
return next();
});