From c795269be12327620393b3e563e9fa4f855e7232 Mon Sep 17 00:00:00 2001 From: ThrRip Date: Tue, 17 Dec 2024 10:22:50 +0800 Subject: [PATCH] home: Add global omits for reducing SSR time when needed This also replaced the monitoring system data collector check based on the user agent string. --- .idea/dictionaries/ThrRip.xml | 1 + app/app.config.ts | 4 +- packages/home/app/app.vue | 11 ++++-- packages/home/app/middleware/omit.global.ts | 39 +++++++++++++++++++ .../app/middleware/trackPageview.global.ts | 7 ++-- packages/home/app/utils/types.ts | 10 +++++ 6 files changed, 63 insertions(+), 9 deletions(-) create mode 100644 packages/home/app/middleware/omit.global.ts create mode 100644 packages/home/app/utils/types.ts diff --git a/.idea/dictionaries/ThrRip.xml b/.idea/dictionaries/ThrRip.xml index e0ba72d..e7be944 100644 --- a/.idea/dictionaries/ThrRip.xml +++ b/.idea/dictionaries/ThrRip.xml @@ -8,6 +8,7 @@ fortawesome getline mktemp + mzgfan nuxtjs pageview singleline diff --git a/app/app.config.ts b/app/app.config.ts index cfb76c8..aa12629 100644 --- a/app/app.config.ts +++ b/app/app.config.ts @@ -19,7 +19,5 @@ export default defineAppConfig({ statsBase: 'https://stats.mzg.fan', - biliApiRoomPlayInfoEndpoint: 'https://api.live.bilibili.com/xlive/web-room/v2/index/getRoomPlayInfo', - - monitoringDataCollectorUserAgentMatch: /^Zabbix$/ + biliApiRoomPlayInfoEndpoint: 'https://api.live.bilibili.com/xlive/web-room/v2/index/getRoomPlayInfo' }) diff --git a/packages/home/app/app.vue b/packages/home/app/app.vue index e9153c5..93350a1 100644 --- a/packages/home/app/app.vue +++ b/packages/home/app/app.vue @@ -264,11 +264,16 @@