diff --git a/server/model/monitor.js b/server/model/monitor.js index c80e941e9..95ef39336 100644 --- a/server/model/monitor.js +++ b/server/model/monitor.js @@ -87,9 +87,9 @@ class Monitor extends BeanModel { * for HTTP "basic" auth, as per RFC-7617 * @returns {string} */ - encodeB64(user, pass) { + encodeB64(user, pass) { return btoa(user + ":" + pass); - } + } /** * Parse to boolean @@ -157,7 +157,7 @@ class Monitor extends BeanModel { if (this.basicauth_user) { basicauthHeader = { "Authorization": "Basic " + this.encodeB64(this.basicauth_user, this.basicauth_pass) - } + }; } const options = { diff --git a/src/pages/EditMonitor.vue b/src/pages/EditMonitor.vue index 18954968a..f5099aa3a 100644 --- a/src/pages/EditMonitor.vue +++ b/src/pages/EditMonitor.vue @@ -266,7 +266,7 @@ - +