From e23b5863eafaff93c4a983e8561c38021e96cf7e Mon Sep 17 00:00:00 2001 From: Ryland Herrick Date: Tue, 4 Feb 2020 18:09:01 -0600 Subject: [PATCH] Prevent http client from converting our form data (#56772) (#56792) If we don't specify an undefined content-type like so, the client attempts to convert our form data into a JSON string, and the backend returns an understandable 415. This fixes rule imports. Co-authored-by: Elastic Machine --- .../plugins/siem/public/containers/detection_engine/rules/api.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/api.ts b/x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/api.ts index 4f50a9bd14788..06fb0c6dc3480 100644 --- a/x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/api.ts +++ b/x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/api.ts @@ -246,6 +246,7 @@ export const importRules = async ({ `${DETECTION_ENGINE_RULES_URL}/_import`, { method: 'POST', + headers: { 'Content-Type': undefined }, query: { overwrite }, body: formData, asResponse: true,