From f652a489b71ef6a55279bba7ec9b2c708076cf7d Mon Sep 17 00:00:00 2001 From: Shreya Malviya Date: Wed, 3 Aug 2022 13:00:43 +0530 Subject: [PATCH] UI: Pass 'Content-Type' header in PUT request when resetting Island mode --- .../ui/src/components/ui-components/IslandResetModal.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/monkey/monkey_island/cc/ui/src/components/ui-components/IslandResetModal.tsx b/monkey/monkey_island/cc/ui/src/components/ui-components/IslandResetModal.tsx index ac7a8afd6..f5b47ac04 100644 --- a/monkey/monkey_island/cc/ui/src/components/ui-components/IslandResetModal.tsx +++ b/monkey/monkey_island/cc/ui/src/components/ui-components/IslandResetModal.tsx @@ -113,7 +113,14 @@ const IslandResetModal = (props: Props) => { }}) .then(res => { if (res.ok) { - return auth.authFetch('/api/island/mode', {method: 'PUT', body: '"unset"'}) + return auth.authFetch( + '/api/island/mode', + { + method: 'PUT', + headers: {'Content-Type': 'application/json'}, + body: '"unset"' + } + ) }}) .then(res => { if (!res.ok) {