Chore: Combine if statements

pull/4700/head
Nelson Chan 4 weeks ago
parent 2027f4949f
commit 83a5b61211
No known key found for this signature in database

@ -541,8 +541,7 @@ class Monitor extends BeanModel {
// fallback for if kelog event is not emitted, but we may still have tlsInfo,
// e.g. if the connection is made through a proxy
if (this.getUrl()?.protocol === "https:") {
if (tlsInfo.valid === undefined) {
if (this.getUrl()?.protocol === "https:" && tlsInfo.valid === undefined) {
const tlsSocket = res.request.res.socket;
if (tlsSocket) {
@ -556,7 +555,6 @@ class Monitor extends BeanModel {
}
}
}
}
if (process.env.UPTIME_KUMA_LOG_RESPONSE_BODY_MONITOR_ID === this.id) {
log.info("monitor", res.data);

Loading…
Cancel
Save