Поправлена отдача статики
This commit is contained in:
@@ -189,9 +189,7 @@ function initStatic(app, config) {
|
|||||||
return next();
|
return next();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (path.extname(req.path) == '.json')
|
if (path.extname(req.path) == '') {
|
||||||
return next();
|
|
||||||
|
|
||||||
const bookFile = `${config.publicFilesDir}${req.path}`;
|
const bookFile = `${config.publicFilesDir}${req.path}`;
|
||||||
const bookFileDesc = `${bookFile}.json`;
|
const bookFileDesc = `${bookFile}.json`;
|
||||||
|
|
||||||
@@ -215,6 +213,7 @@ function initStatic(app, config) {
|
|||||||
|
|
||||||
if (downFileName)
|
if (downFileName)
|
||||||
res.downFileName = downFileName;
|
res.downFileName = downFileName;
|
||||||
|
}
|
||||||
|
|
||||||
return next();
|
return next();
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user