fix: muppet

This commit is contained in:
zkldi
2024-04-10 03:06:04 +01:00
parent 1486ccf2f5
commit 613fb2b247
+4 -4
View File
@@ -85,10 +85,6 @@ if (Environment.nodeEnv !== "production" && IsNonEmptyString(ServerConfig.CLIENT
next();
});
if (ServerConfig.ENABLE_METRICS) {
app.use(ExpressPromBundle({ includeMethod: true, includePath: true }));
}
// hack to allow all OPTIONS requests. Remember that this setting should not be on in production!
if (ServerConfig.OPTIONS_ALWAYS_SUCCEEDS === true) {
app.options("*", (req, res) => res.send());
@@ -113,6 +109,10 @@ if (Environment.nodeEnv !== "production" && IsNonEmptyString(ServerConfig.CLIENT
app.use(helmet());
}
if (ServerConfig.ENABLE_METRICS) {
app.use(ExpressPromBundle({ includeMethod: true, includePath: true }));
}
app.use(userSessionMiddleware);
// Most of these options are leveraged from KTAPI