diff --git a/server/server.js b/server/server.js index 2a4a5a4db..2d3f37eeb 100644 --- a/server/server.js +++ b/server/server.js @@ -654,7 +654,7 @@ let needSetup = false; bean.retryInterval = monitor.retryInterval; bean.hostname = monitor.hostname; bean.maxretries = monitor.maxretries; - bean.port = monitor.port; + bean.port = parseInt(monitor.port); bean.keyword = monitor.keyword; bean.ignoreTls = monitor.ignoreTls; bean.expiryNotification = monitor.expiryNotification; diff --git a/src/pages/EditMonitor.vue b/src/pages/EditMonitor.vue index 4d39dc9fc..f8791d3f9 100644 --- a/src/pages/EditMonitor.vue +++ b/src/pages/EditMonitor.vue @@ -535,7 +535,7 @@ export default { if (this.monitor.type === "dns") { this.monitor.port = "53"; } else { - this.monitor.port = ""; + this.monitor.port = undefined; } } }