Server.js: add UI_TRAFFIC_STATS

This commit is contained in:
Philip H
2024-03-14 08:55:15 +01:00
committed by GitHub
parent e9480a5ed5
commit 8c771b054c

View File

@@ -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;