mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Ensure httpServerOptions gets applied to ALL the express apps
This is silly. Turns out setting options at a top level app does not percolate down to sub apps (and vice versa). You have to apply the options to ALL express apps.
This commit is contained in:
@@ -39,6 +39,15 @@ module.exports = {
|
||||
|
||||
var adminApp = express();
|
||||
|
||||
var defaultServerSettings = {
|
||||
"x-powered-by": false
|
||||
}
|
||||
var serverSettings = Object.assign({},defaultServerSettings,settings.httpServerOptions||{});
|
||||
for (var eOption in serverSettings) {
|
||||
adminApp.set(eOption, serverSettings[eOption]);
|
||||
}
|
||||
|
||||
|
||||
// Flows
|
||||
adminApp.get("/flows",needsPermission("flows.read"),flows.get,apiUtil.errorHandler);
|
||||
adminApp.post("/flows",needsPermission("flows.write"),flows.post,apiUtil.errorHandler);
|
||||
|
Reference in New Issue
Block a user