[Docker Monitor] Change tcp:// to http://

This commit is contained in:
Louis Lam
2022-10-04 16:19:56 +08:00
parent 1c4e97439c
commit 0686757160
4 changed files with 18 additions and 4 deletions

View File

@@ -17,6 +17,7 @@ const version = require("../../package.json").version;
const apicache = require("../modules/apicache");
const { UptimeKumaServer } = require("../uptime-kuma-server");
const { CacheableDnsHttpAgent } = require("../cacheable-dns-http-agent");
const { DockerHost } = require("../docker");
/**
* status:
@@ -498,7 +499,7 @@ class Monitor extends BeanModel {
if (dockerHost._dockerType === "socket") {
options.socketPath = dockerHost._dockerDaemon;
} else if (dockerHost._dockerType === "tcp") {
options.baseURL = dockerHost._dockerDaemon;
options.baseURL = DockerHost.patchDockerURL(dockerHost._dockerDaemon);
}
log.debug(`[${this.name}] Axios Request`);