mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Merge pull request #2555 from node-red/authMiddleware
Add httpAdminMiddleware to allow custom headers on admin routes
This commit is contained in:
@@ -59,6 +59,12 @@ function init(settings,_server,storage,runtimeAPI) {
|
||||
});
|
||||
adminApp.use(corsHandler);
|
||||
|
||||
if (settings.httpAdminMiddleware) {
|
||||
if (typeof settings.httpAdminMiddleware === "function") {
|
||||
adminApp.use(settings.httpAdminMiddleware)
|
||||
}
|
||||
}
|
||||
|
||||
auth.init(settings,storage);
|
||||
|
||||
var maxApiRequestSize = settings.apiMaxLength || '5mb';
|
||||
|
Reference in New Issue
Block a user