mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-07-24 07:21:09 -04:00
Bind cacheable-lookup to custom http agent
This commit is contained in:
parent
25d711e683
commit
2073f0c284
3 changed files with 57 additions and 5 deletions
|
@ -7,7 +7,7 @@ const { R } = require("redbean-node");
|
|||
const { log } = require("../src/util");
|
||||
const Database = require("./database");
|
||||
const util = require("util");
|
||||
const CacheableLookup = require("cacheable-lookup");
|
||||
const { CacheableDnsHttpAgent } = require("./cacheable-dns-http-agent");
|
||||
|
||||
/**
|
||||
* `module.exports` (alias: `server`) should be inside this class, in order to avoid circular dependency issue.
|
||||
|
@ -72,9 +72,7 @@ class UptimeKumaServer {
|
|||
}
|
||||
}
|
||||
|
||||
const cacheable = new CacheableLookup();
|
||||
cacheable.install(http.globalAgent);
|
||||
cacheable.install(https.globalAgent);
|
||||
CacheableDnsHttpAgent.registerGlobalAgent();
|
||||
|
||||
this.io = new Server(this.httpServer);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue