From 25d5a6fa032db24636d5dd622f36b13d960a71e0 Mon Sep 17 00:00:00 2001 From: TheBeastLT Date: Sun, 14 Jan 2024 06:55:06 +0200 Subject: [PATCH] remove sw stats --- addon/index.js | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/addon/index.js b/addon/index.js index ab0f0a4..73606ab 100644 --- a/addon/index.js +++ b/addon/index.js @@ -1,22 +1,9 @@ import express from 'express'; -import swStats from 'swagger-stats'; import serverless from './serverless.js'; -import { manifest } from './lib/manifest.js'; import { initBestTrackers } from './lib/magnetHelper.js'; const app = express(); app.enable('trust proxy'); -app.use(swStats.getMiddleware({ - name: manifest().name, - version: manifest().version, - timelineBucketDuration: 60 * 60 * 1000, - apdexThreshold: 100, - authentication: true, - onAuthenticate: (req, username, password) => { - return username === process.env.METRICS_USER - && password === process.env.METRICS_PASSWORD - }, -})) app.use(express.static('static', { maxAge: '1y' })); app.use((req, res, next) => serverless(req, res, next)); app.listen(process.env.PORT || 7000, () => {