From 32f8c06390dba7efe919855135b243da7e9f2427 Mon Sep 17 00:00:00 2001 From: Nathan <34570423+thisprojects@users.noreply.github.com> Date: Fri, 10 Mar 2023 22:05:54 +0000 Subject: [PATCH] fix: #2779 - strip trailing slash on s3 endpoint (#2788) Co-authored-by: thisProjects --- web/components/admin/config/server/EditStorage.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/web/components/admin/config/server/EditStorage.tsx b/web/components/admin/config/server/EditStorage.tsx index 4fa415bf4..2923429e2 100644 --- a/web/components/admin/config/server/EditStorage.tsx +++ b/web/components/admin/config/server/EditStorage.tsx @@ -126,6 +126,9 @@ export default function EditStorage() { const handleSave = async () => { setSubmitStatus(createInputStatus(STATUS_PROCESSING)); const postValue = formDataValues; + if (postValue?.servingEndpoint) { + postValue.servingEndpoint = postValue?.servingEndpoint?.replace(/\/+$/g, ''); + } await postConfigUpdateToAPI({ apiPath: API_S3_INFO,