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 @@ -92,13 +92,15 @@ var (
9292 // AppDataPath is the default path for storing data.
9393 // It maps to ini:"APP_DATA_PATH" and defaults to AppWorkPath + "/data"
9494 AppDataPath string
95+ // LocalURL is the url for locally running applications to contact Gitea. It always has a '/' suffix
96+ // It maps to ini:"LOCAL_ROOT_URL"
97+ LocalURL string
9598
9699 // Server settings
97100 Protocol Scheme
98101 Domain string
99102 HTTPAddr string
100103 HTTPPort string
101- LocalURL string
102104 RedirectOtherPort bool
103105 PortToRedirect string
104106 OfflineMode bool
@@ -712,6 +714,7 @@ func loadFromConf(allowEmpty bool, extraConfig string) {
712714 }
713715 }
714716 LocalURL = sec .Key ("LOCAL_ROOT_URL" ).MustString (defaultLocalURL )
717+ LocalURL = strings .TrimRight (LocalURL , "/" ) + "/"
715718 RedirectOtherPort = sec .Key ("REDIRECT_OTHER_PORT" ).MustBool (false )
716719 PortToRedirect = sec .Key ("PORT_TO_REDIRECT" ).MustString ("80" )
717720 OfflineMode = sec .Key ("OFFLINE_MODE" ).MustBool ()
You can’t perform that action at this time.
0 commit comments