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:
@@ -64,10 +64,12 @@ module.exports = {
|
||||
}
|
||||
});
|
||||
}
|
||||
if (settings.httpServerOptions) {
|
||||
for (var eOption in settings.httpServerOptions) {
|
||||
editorApp.set(eOption, settings.httpServerOptions[eOption]);
|
||||
}
|
||||
var defaultServerSettings = {
|
||||
"x-powered-by": false
|
||||
}
|
||||
var serverSettings = Object.assign({},defaultServerSettings,settings.httpServerOptions||{});
|
||||
for (var eOption in serverSettings) {
|
||||
editorApp.set(eOption, serverSettings[eOption]);
|
||||
}
|
||||
editorApp.get("/",ensureRuntimeStarted,ui.ensureSlash,ui.editor);
|
||||
|
||||
|
Reference in New Issue
Block a user