From 6a8ccf627a957a02874171c4ca8baf9edb2287f7 Mon Sep 17 00:00:00 2001 From: LouisLam Date: Thu, 12 Aug 2021 01:31:07 +0800 Subject: [PATCH] add version to user agent --- server/model/monitor.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/model/monitor.js b/server/model/monitor.js index b8df38302..4c667342d 100644 --- a/server/model/monitor.js +++ b/server/model/monitor.js @@ -11,6 +11,7 @@ const { tcping, ping, checkCertificate, checkStatusCode } = require("../util-ser const { R } = require("redbean-node"); const { BeanModel } = require("redbean-node/dist/bean-model"); const { Notification } = require("../notification") +const version = require("../package.json").version; /** * status: @@ -113,7 +114,7 @@ class Monitor extends BeanModel { timeout: this.interval * 1000 * 0.8, headers: { "Accept": "*/*", - "User-Agent": "Uptime-Kuma", + "User-Agent": "Uptime-Kuma/" + version, }, httpsAgent: new https.Agent({ maxCachedSessions: 0,