summaryrefslogtreecommitdiffstats
path: root/cmd/web_graceful.go
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2021-03-08 02:43:59 +0000
committerGitHub <noreply@github.com>2021-03-08 03:43:59 +0100
commitc03f530212249b18ffb73dfa47c99e9a4ed7c86c (patch)
treed6fc58f469c32e796491eee02a1f9ccbfde957ae /cmd/web_graceful.go
parent78b7529cd471eafefd555fe82b8dbb8b63dcd9f5 (diff)
downloadgitea-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_graceful.go')
-rw-r--r--cmd/web_graceful.go16
1 files changed, 8 insertions, 8 deletions
diff --git a/cmd/web_graceful.go b/cmd/web_graceful.go
index 9e039de699..5db065818a 100644
--- a/cmd/web_graceful.go
+++ b/cmd/web_graceful.go
@@ -14,16 +14,16 @@ import (
"code.gitea.io/gitea/modules/log"
)
-func runHTTP(network, listenAddr string, m http.Handler) error {
- return graceful.HTTPListenAndServe(network, listenAddr, m)
+func runHTTP(network, listenAddr, name string, m http.Handler) error {
+ return graceful.HTTPListenAndServe(network, listenAddr, name, m)
}
-func runHTTPS(network, listenAddr, certFile, keyFile string, m http.Handler) error {
- return graceful.HTTPListenAndServeTLS(network, listenAddr, certFile, keyFile, m)
+func runHTTPS(network, listenAddr, name, certFile, keyFile string, m http.Handler) error {
+ return graceful.HTTPListenAndServeTLS(network, listenAddr, name, certFile, keyFile, m)
}
-func runHTTPSWithTLSConfig(network, listenAddr string, tlsConfig *tls.Config, m http.Handler) error {
- return graceful.HTTPListenAndServeTLSConfig(network, listenAddr, tlsConfig, m)
+func runHTTPSWithTLSConfig(network, listenAddr, name string, tlsConfig *tls.Config, m http.Handler) error {
+ return graceful.HTTPListenAndServeTLSConfig(network, listenAddr, name, tlsConfig, m)
}
// NoHTTPRedirector tells our cleanup routine that we will not be using a fallback http redirector
@@ -43,9 +43,9 @@ func NoInstallListener() {
graceful.GetManager().InformCleanup()
}
-func runFCGI(network, listenAddr string, m http.Handler) error {
+func runFCGI(network, listenAddr, name string, m http.Handler) error {
// This needs to handle stdin as fcgi point
- fcgiServer := graceful.NewServer(network, listenAddr)
+ fcgiServer := graceful.NewServer(network, listenAddr, name)
err := fcgiServer.ListenAndServe(func(listener net.Listener) error {
return fcgi.Serve(listener, m)