From 07c970e3fedb5fa33b524a328c63be8c13445bf0 Mon Sep 17 00:00:00 2001 From: Ben McClelland Date: Wed, 4 Mar 2026 10:32:52 -0800 Subject: [PATCH] fix: webui pass correct arguments to request() in putBucketPolicy The fifth parameter of request() is useAdminEndpoint (boolean), but putBucketPolicy was passing a Content-Type header object instead. This caused useAdminEndpoint to be truthy and contentType to default to 'application/xml' instead of 'application/json'. Fixed by passing false for useAdminEndpoint and 'application/json' as the contentType argument. Fixes #1928 --- webui/web/js/api.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/webui/web/js/api.js b/webui/web/js/api.js index 3e12e30..0ec6de2 100644 --- a/webui/web/js/api.js +++ b/webui/web/js/api.js @@ -1846,9 +1846,7 @@ ${tagsXml} */ async putBucketPolicy(bucket, policy) { const policyJson = JSON.stringify(policy); - await this.request('PUT', `/${bucket}`, { policy: '' }, policyJson, { - 'Content-Type': 'application/json' - }); + await this.request('PUT', `/${bucket}`, { policy: '' }, policyJson, false, 'application/json'); } /**