httpStaticMiddleware support array of middlewares

This commit is contained in:
sak 2023-04-08 13:11:46 +07:00
parent 8d06be81d8
commit 5f47967682

View File

@ -424,7 +424,7 @@ httpsPromise.then(function(startupHttps) {
if (settings.httpStatic) {
let appUseMem = {};
let httpStaticMiddleware = (req, res, next) => next()
if (typeof settings.httpStaticMiddleware === 'function' || isArray(settings.httpStaticMiddleware)) {
if (typeof settings.httpStaticMiddleware === 'function' || Array.isArray(settings.httpStaticMiddleware)) {
httpStaticMiddleware = settings.httpStaticMiddleware
}