mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-11-24 08:32:23 +02:00
Merge pull request #6 from TheGuyDanish/patch-1
Introduce custom user agent. Fixes #5
This commit is contained in:
commit
35ce54f30c
@ -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':'Uptime-Kuma' }
|
||||
})
|
||||
bean.msg = `${res.status} - ${res.statusText}`
|
||||
bean.ping = dayjs().valueOf() - startTime;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user