mirror of
https://github.com/go-gitea/gitea
synced 2024-12-22 13:57:51 +01:00
Backport #19171 Fix #19166 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
parent
4b7cb813e6
commit
a3ccbb5b7f
@ -92,13 +92,15 @@ var (
|
|||||||
// AppDataPath is the default path for storing data.
|
// AppDataPath is the default path for storing data.
|
||||||
// It maps to ini:"APP_DATA_PATH" and defaults to AppWorkPath + "/data"
|
// It maps to ini:"APP_DATA_PATH" and defaults to AppWorkPath + "/data"
|
||||||
AppDataPath string
|
AppDataPath string
|
||||||
|
// LocalURL is the url for locally running applications to contact Gitea. It always has a '/' suffix
|
||||||
|
// It maps to ini:"LOCAL_ROOT_URL"
|
||||||
|
LocalURL string
|
||||||
|
|
||||||
// Server settings
|
// Server settings
|
||||||
Protocol Scheme
|
Protocol Scheme
|
||||||
Domain string
|
Domain string
|
||||||
HTTPAddr string
|
HTTPAddr string
|
||||||
HTTPPort string
|
HTTPPort string
|
||||||
LocalURL string
|
|
||||||
RedirectOtherPort bool
|
RedirectOtherPort bool
|
||||||
PortToRedirect string
|
PortToRedirect string
|
||||||
OfflineMode bool
|
OfflineMode bool
|
||||||
@ -712,6 +714,7 @@ func loadFromConf(allowEmpty bool, extraConfig string) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
LocalURL = sec.Key("LOCAL_ROOT_URL").MustString(defaultLocalURL)
|
LocalURL = sec.Key("LOCAL_ROOT_URL").MustString(defaultLocalURL)
|
||||||
|
LocalURL = strings.TrimRight(LocalURL, "/") + "/"
|
||||||
RedirectOtherPort = sec.Key("REDIRECT_OTHER_PORT").MustBool(false)
|
RedirectOtherPort = sec.Key("REDIRECT_OTHER_PORT").MustBool(false)
|
||||||
PortToRedirect = sec.Key("PORT_TO_REDIRECT").MustString("80")
|
PortToRedirect = sec.Key("PORT_TO_REDIRECT").MustString("80")
|
||||||
OfflineMode = sec.Key("OFFLINE_MODE").MustBool()
|
OfflineMode = sec.Key("OFFLINE_MODE").MustBool()
|
||||||
|
Loading…
Reference in New Issue
Block a user