File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -89,13 +89,15 @@ var (
8989 // AppDataPath is the default path for storing data.
9090 // It maps to ini:"APP_DATA_PATH" and defaults to AppWorkPath + "/data"
9191 AppDataPath string
92+ // LocalURL is the url for locally running applications to contact Gitea. It always has a '/' suffix
93+ // It maps to ini:"LOCAL_ROOT_URL"
94+ LocalURL string
9295
9396 // Server settings
9497 Protocol Scheme
9598 Domain string
9699 HTTPAddr string
97100 HTTPPort string
98- LocalURL string
99101 RedirectOtherPort bool
100102 PortToRedirect string
101103 OfflineMode bool
@@ -747,6 +749,7 @@ func loadFromConf(allowEmpty bool, extraConfig string) {
747749 }
748750 }
749751 LocalURL = sec .Key ("LOCAL_ROOT_URL" ).MustString (defaultLocalURL )
752+ LocalURL = strings .TrimRight (LocalURL , "/" ) + "/"
750753 RedirectOtherPort = sec .Key ("REDIRECT_OTHER_PORT" ).MustBool (false )
751754 PortToRedirect = sec .Key ("PORT_TO_REDIRECT" ).MustString ("80" )
752755 OfflineMode = sec .Key ("OFFLINE_MODE" ).MustBool ()
You can’t perform that action at this time.
0 commit comments