From eef1e59dd5d74e8424abfe2a4d9e27ad0d89677f Mon Sep 17 00:00:00 2001 From: Anton K Date: Mon, 5 May 2025 15:22:18 +0200 Subject: [PATCH] FIO-9918 Removed potential trailing slashes in baseURL --- src/sdk/Formio.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/sdk/Formio.ts b/src/sdk/Formio.ts index f3fc3f9f..5dfb29e4 100644 --- a/src/sdk/Formio.ts +++ b/src/sdk/Formio.ts @@ -1930,9 +1930,10 @@ export class Formio { * @param {string} url - The URL of the Base API url. */ static setBaseUrl(url: string) { - Formio.baseUrl = url; + const normalizedUrl = url.replace(/\/+$/, ''); + Formio.baseUrl = normalizedUrl; if (!Formio.projectUrlSet) { - Formio.projectUrl = url; + Formio.projectUrl = normalizedUrl; } }