From 796bd839c9af1f3919df35f7f1abe2f0f8a84593 Mon Sep 17 00:00:00 2001 From: Gordon Tyler Date: Thu, 17 Jul 2025 20:57:10 -0400 Subject: [PATCH 1/2] fix(api): don't require content type for apps delete endpoint (#4069) The DELETE /api/apps/{index} endpoint should not require a content-type header because it does not parse the content of the request. --- src/confighttp.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/confighttp.cpp b/src/confighttp.cpp index 09dd671cd70..5744cc045e3 100644 --- a/src/confighttp.cpp +++ b/src/confighttp.cpp @@ -692,9 +692,6 @@ namespace confighttp { * @api_examples{/api/apps/9999| DELETE| null} */ void deleteApp(resp_https_t response, req_https_t request) { - if (!check_content_type(response, request, "application/json")) { - return; - } if (!authenticate(response, request)) { return; } From d079b9e566277b9a83be3e180ed3b09830d531c6 Mon Sep 17 00:00:00 2001 From: Gordon Tyler Date: Thu, 17 Jul 2025 21:03:58 -0400 Subject: [PATCH 2/2] Add comment explaining why check_content_type is skipped. --- src/confighttp.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/confighttp.cpp b/src/confighttp.cpp index 5744cc045e3..b50e94d965d 100644 --- a/src/confighttp.cpp +++ b/src/confighttp.cpp @@ -692,6 +692,8 @@ namespace confighttp { * @api_examples{/api/apps/9999| DELETE| null} */ void deleteApp(resp_https_t response, req_https_t request) { + // Skip check_content_type() for this endpoint since the request body is not used. + if (!authenticate(response, request)) { return; }