瀏覽代碼

Clean root URL of trailing slashes when updating settings.

Kailash Nadh 1 年之前
父節點
當前提交
82c3c6878b
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      cmd/settings.go

+ 2 - 0
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