diff options
author | zeripath <art27@cantab.net> | 2021-03-08 02:43:59 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-08 03:43:59 +0100 |
commit | c03f530212249b18ffb73dfa47c99e9a4ed7c86c (patch) | |
tree | d6fc58f469c32e796491eee02a1f9ccbfde957ae /cmd/web.go | |
parent | 78b7529cd471eafefd555fe82b8dbb8b63dcd9f5 (diff) | |
download | gitea-c03f530212249b18ffb73dfa47c99e9a4ed7c86c.tar.gz gitea-c03f530212249b18ffb73dfa47c99e9a4ed7c86c.zip |
Make internal SSH server host key path configurable (#14918)
* Make SSH server host key path configurable
* make it possible to have multiple keys
* Make gitea.rsa the default key
* Add some more logging
Signed-off-by: Andrew Thornton <art27@cantab.net>
Diffstat (limited to 'cmd/web.go')
-rw-r--r-- | cmd/web.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/cmd/web.go b/cmd/web.go index 79915ad194..423917ba4e 100644 --- a/cmd/web.go +++ b/cmd/web.go @@ -64,7 +64,7 @@ func runHTTPRedirector() { http.Redirect(w, r, target, http.StatusTemporaryRedirect) }) - var err = runHTTP("tcp", source, context2.ClearHandler(handler)) + var err = runHTTP("tcp", source, "HTTP Redirector", context2.ClearHandler(handler)) if err != nil { log.Fatal("Failed to start port redirection: %v", err) @@ -198,7 +198,7 @@ func listen(m http.Handler, handleRedirector bool) error { if handleRedirector { NoHTTPRedirector() } - err = runHTTP("tcp", listenAddr, context2.ClearHandler(m)) + err = runHTTP("tcp", listenAddr, "Web", context2.ClearHandler(m)) case setting.HTTPS: if setting.EnableLetsEncrypt { err = runLetsEncrypt(listenAddr, setting.Domain, setting.LetsEncryptDirectory, setting.LetsEncryptEmail, context2.ClearHandler(m)) @@ -211,22 +211,22 @@ func listen(m http.Handler, handleRedirector bool) error { NoHTTPRedirector() } } - err = runHTTPS("tcp", listenAddr, setting.CertFile, setting.KeyFile, context2.ClearHandler(m)) + err = runHTTPS("tcp", listenAddr, "Web", setting.CertFile, setting.KeyFile, context2.ClearHandler(m)) case setting.FCGI: if handleRedirector { NoHTTPRedirector() } - err = runFCGI("tcp", listenAddr, context2.ClearHandler(m)) + err = runFCGI("tcp", listenAddr, "FCGI Web", context2.ClearHandler(m)) case setting.UnixSocket: if handleRedirector { NoHTTPRedirector() } - err = runHTTP("unix", listenAddr, context2.ClearHandler(m)) + err = runHTTP("unix", listenAddr, "Web", context2.ClearHandler(m)) case setting.FCGIUnix: if handleRedirector { NoHTTPRedirector() } - err = runFCGI("unix", listenAddr, context2.ClearHandler(m)) + err = runFCGI("unix", listenAddr, "Web", context2.ClearHandler(m)) default: log.Fatal("Invalid protocol: %s", setting.Protocol) } |