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 @@ -89,13 +89,15 @@ var (
89
89
// AppDataPath is the default path for storing data.
90
90
// It maps to ini:"APP_DATA_PATH" and defaults to AppWorkPath + "/data"
91
91
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
92
95
93
96
// Server settings
94
97
Protocol Scheme
95
98
Domain string
96
99
HTTPAddr string
97
100
HTTPPort string
98
- LocalURL string
99
101
RedirectOtherPort bool
100
102
PortToRedirect string
101
103
OfflineMode bool
@@ -747,6 +749,7 @@ func loadFromConf(allowEmpty bool, extraConfig string) {
747
749
}
748
750
}
749
751
LocalURL = sec .Key ("LOCAL_ROOT_URL" ).MustString (defaultLocalURL )
752
+ LocalURL = strings .TrimRight (LocalURL , "/" ) + "/"
750
753
RedirectOtherPort = sec .Key ("REDIRECT_OTHER_PORT" ).MustBool (false )
751
754
PortToRedirect = sec .Key ("PORT_TO_REDIRECT" ).MustString ("80" )
752
755
OfflineMode = sec .Key ("OFFLINE_MODE" ).MustBool ()
You can’t perform that action at this time.
0 commit comments