From 06640dc134e7eecfc3a16cdce03ab51d50b01d1e Mon Sep 17 00:00:00 2001 From: Stetsed <33891782+Stetsed@users.noreply.github.com> Date: Sun, 11 Jul 2021 20:07:13 +0000 Subject: [PATCH] Updating User-Agent Changing User-Agent to "Kuma Uptime Monitoring" to make user-agent more unique. --- server/model/monitor.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/model/monitor.js b/server/model/monitor.js index 2735c378f..b04f608be 100644 --- a/server/model/monitor.js +++ b/server/model/monitor.js @@ -71,7 +71,9 @@ class Monitor extends BeanModel { try { if (this.type === "http" || this.type === "keyword") { let startTime = dayjs().valueOf(); - let res = await axios.get(this.url) + let res = await axios.get(this.url, { + headers: { 'User-Agent':'Kuma Uptime Monitoring' } + }) bean.msg = `${res.status} - ${res.statusText}` bean.ping = dayjs().valueOf() - startTime;