diff options
Diffstat (limited to 'cmd/web.go')
-rw-r--r-- | cmd/web.go | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/cmd/web.go b/cmd/web.go index a513f589ac..bbf386d43f 100644 --- a/cmd/web.go +++ b/cmd/web.go @@ -5,7 +5,6 @@ package cmd import ( - "crypto/tls" "fmt" "net" "net/http" @@ -619,10 +618,9 @@ func runWeb(ctx *cli.Context) error { var err error switch setting.Protocol { case setting.HTTP: - err = http.ListenAndServe(listenAddr, m) + err = runHTTP(listenAddr, m) case setting.HTTPS: - server := &http.Server{Addr: listenAddr, TLSConfig: &tls.Config{MinVersion: tls.VersionTLS10}, Handler: m} - err = server.ListenAndServeTLS(setting.CertFile, setting.KeyFile) + err = runHTTPS(listenAddr, setting.CertFile, setting.KeyFile, m) case setting.FCGI: err = fcgi.Serve(nil, m) case setting.UnixSocket: |