-
-
Notifications
You must be signed in to change notification settings - Fork 6k
Closed
Labels
type/bugtype/docsThis PR mainly updates/creates documentationThis PR mainly updates/creates documentation
Description
Description
On the Config Cheat Sheet, the default listed for [server] LOCAL_ROOT_URL
is only correct when protocol is not fcgi/fcgi+unix/http+unix:
LOCAL_ROOT_URL: %(PROTOCOL)s://%(HTTP_ADDR)s:%(HTTP_PORT)s/: Local (DMZ) URL for Gitea workers (such as SSH update) accessing web service. In most cases you do not need to change the default value. Alter it only if your SSH server node is not the same as HTTP node. Do not set this variable if PROTOCOL is set to http+unix.
See the code here:
var defaultLocalURL string
switch Protocol {
case HTTPUnix:
defaultLocalURL = "http://unix/"
case FCGI:
defaultLocalURL = AppURL
case FCGIUnix:
defaultLocalURL = AppURL
default:
defaultLocalURL = string(Protocol) + "://"
if HTTPAddr == "0.0.0.0" {
defaultLocalURL += net.JoinHostPort("localhost", HTTPPort) + "/"
} else {
defaultLocalURL += net.JoinHostPort(HTTPAddr, HTTPPort) + "/"
}
}
LocalURL = sec.Key("LOCAL_ROOT_URL").MustString(defaultLocalURL)
Gitea Version
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
No response
Git Version
No response
Operating System
No response
How are you running Gitea?
N/A
Database
None
Metadata
Metadata
Assignees
Labels
type/bugtype/docsThis PR mainly updates/creates documentationThis PR mainly updates/creates documentation