Add configurable dns cache

This commit is contained in:
Louis Lam
2022-12-12 17:19:22 +08:00
parent e6dc0a0293
commit 3b87209e26
9 changed files with 90 additions and 8 deletions

View File

@@ -83,12 +83,12 @@ class UptimeKumaServer {
}
}
CacheableDnsHttpAgent.registerGlobalAgent();
this.io = new Server(this.httpServer);
}
async initAfterDatabaseReady() {
await CacheableDnsHttpAgent.update();
process.env.TZ = await this.getTimezone();
dayjs.tz.setDefault(process.env.TZ);
log.debug("DEBUG", "Timezone: " + process.env.TZ);