From 82c3c6878b29bcccac4414ca13a0ef9a873902f9 Mon Sep 17 00:00:00 2001 From: Kailash Nadh Date: Tue, 19 Sep 2023 15:23:32 +0530 Subject: [PATCH] Clean root URL of trailing slashes when updating settings. --- cmd/settings.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmd/settings.go b/cmd/settings.go index f8411b33..421f4b76 100644 --- a/cmd/settings.go +++ b/cmd/settings.go @@ -121,6 +121,8 @@ func handleUpdateSettings(c echo.Context) error { return echo.NewHTTPError(http.StatusBadRequest, app.i18n.T("settings.errorNoSMTP")) } + set.AppRootURL = strings.TrimRight(set.AppRootURL, "/") + // Bounce boxes. for i, s := range set.BounceBoxes { // Assign a UUID. The frontend only sends a password when the user explicitly