From 8c771b054cad6cbbdaeb0ae977a3ebb7eb6ae776 Mon Sep 17 00:00:00 2001 From: Philip H <47042125+pheiduck@users.noreply.github.com> Date: Thu, 14 Mar 2024 08:55:15 +0100 Subject: [PATCH] Server.js: add UI_TRAFFIC_STATS --- src/lib/Server.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib/Server.js b/src/lib/Server.js index 8d1050a0..fea688b7 100644 --- a/src/lib/Server.js +++ b/src/lib/Server.js @@ -63,7 +63,10 @@ module.exports = class Server { return `"${LANG}"`; })) - + .get('/api/ui-traffic-stats', (Util.promisify(async () => { + return UI_TRAFFIC_STATS === 'true'; + })) + // Authentication .get('/api/session', defineEventHandler((event) => { const requiresPassword = !!process.env.PASSWORD;