From ceb5708bfdd2b50327816bacc917dfb4be6b33b3 Mon Sep 17 00:00:00 2001 From: Anders Kvist Date: Mon, 7 Aug 2023 09:13:51 +0200 Subject: [PATCH] =?UTF-8?q?Fix=20case=20for=20setting=20httpBodyEncoding?= =?UTF-8?q?=20to=20null=20-=20does=20work=20for=20http,=20b=E2=80=A6=20(#3?= =?UTF-8?q?498)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fix case for setting httpBodyEncoding to null - does work for http, but not for keyword if anything else but json. * Updating case. * Update src/pages/EditMonitor.vue Added suggestion from @CommanderStorm Co-authored-by: Frank Elsinga * Update src/pages/EditMonitor.vue Co-authored-by: Frank Elsinga --------- Co-authored-by: Anders Kvist Co-authored-by: Frank Elsinga --- src/pages/EditMonitor.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pages/EditMonitor.vue b/src/pages/EditMonitor.vue index c13ecc7a6..0e1faf372 100644 --- a/src/pages/EditMonitor.vue +++ b/src/pages/EditMonitor.vue @@ -1348,7 +1348,8 @@ message HealthCheckResponse { this.monitor.body = JSON.stringify(JSON.parse(this.monitor.body), null, 4); } - if (this.monitor.type && this.monitor.type !== "http" && (this.monitor.type !== "keyword" || this.monitor.type !== "json-query")) { + const monitorTypesWithEncodingAllowed = [ "http", "keyword", "json-query" ]; + if (this.monitor.type && !monitorTypesWithEncodingAllowed.includes(this.monitor.type)) { this.monitor.httpBodyEncoding = null; }