|
|
@ -71,7 +71,9 @@ class Monitor extends BeanModel {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
if (this.type === "http" || this.type === "keyword") {
|
|
|
|
if (this.type === "http" || this.type === "keyword") {
|
|
|
|
let startTime = dayjs().valueOf();
|
|
|
|
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.msg = `${res.status} - ${res.statusText}`
|
|
|
|
bean.ping = dayjs().valueOf() - startTime;
|
|
|
|
bean.ping = dayjs().valueOf() - startTime;
|
|
|
|
|
|
|
|
|
|
|
|