File tree 1 file changed +4
-1
lines changed
1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -92,13 +92,15 @@ var (
92
92
// AppDataPath is the default path for storing data.
93
93
// It maps to ini:"APP_DATA_PATH" and defaults to AppWorkPath + "/data"
94
94
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
95
98
96
99
// Server settings
97
100
Protocol Scheme
98
101
Domain string
99
102
HTTPAddr string
100
103
HTTPPort string
101
- LocalURL string
102
104
RedirectOtherPort bool
103
105
PortToRedirect string
104
106
OfflineMode bool
@@ -712,6 +714,7 @@ func loadFromConf(allowEmpty bool, extraConfig string) {
712
714
}
713
715
}
714
716
LocalURL = sec .Key ("LOCAL_ROOT_URL" ).MustString (defaultLocalURL )
717
+ LocalURL = strings .TrimRight (LocalURL , "/" ) + "/"
715
718
RedirectOtherPort = sec .Key ("REDIRECT_OTHER_PORT" ).MustBool (false )
716
719
PortToRedirect = sec .Key ("PORT_TO_REDIRECT" ).MustString ("80" )
717
720
OfflineMode = sec .Key ("OFFLINE_MODE" ).MustBool ()
You can’t perform that action at this time.
0 commit comments