From 613fb2b247dfedb5dc52a1b52c39d74b93168b04 Mon Sep 17 00:00:00 2001 From: zkldi <20380519+zkldi@users.noreply.github.com> Date: Wed, 10 Apr 2024 03:05:50 +0100 Subject: [PATCH] fix: muppet --- server/src/server/server.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/server/src/server/server.ts b/server/src/server/server.ts index 2b3f5f0e6..d2734f145 100644 --- a/server/src/server/server.ts +++ b/server/src/server/server.ts @@ -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