We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c1d5983 commit 0afab87Copy full SHA for 0afab87
modules/setting/setting.go
@@ -583,9 +583,7 @@ please consider changing to GITEA_CUSTOM`)
583
sec := Cfg.Section("server")
584
AppName = Cfg.Section("").Key("APP_NAME").MustString("Gitea: Git with a cup of tea")
585
AppURL = sec.Key("ROOT_URL").MustString("http://localhost:3000/")
586
- if AppURL[len(AppURL)-1] != '/' {
587
- AppURL += "/"
588
- }
+ AppURL = strings.TrimRight(AppURL, "/") + "/"
589
590
// Check if has app suburl.
591
url, err := url.Parse(AppURL)
0 commit comments