mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
allow for adding an array of middleware functions
This commit is contained in:
parent
9b1c114c3f
commit
34b27f2e68
@ -59,8 +59,8 @@ function init(settings,_server,storage,runtimeAPI) {
|
||||
adminApp.use(corsHandler);
|
||||
|
||||
if (settings.httpAdminMiddleware) {
|
||||
if (typeof settings.httpAdminMiddleware === "function") {
|
||||
adminApp.use(settings.httpAdminMiddleware)
|
||||
if (typeof settings.httpAdminMiddleware === "function" || Array.isArray(settings.httpAdminMiddleware)) {
|
||||
adminApp.use(settings.httpAdminMiddleware);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user