mirror of
https://github.com/go-gitea/gitea
synced 2024-12-23 09:04:26 +00:00
increase minimum version vor HTTPS to TLS 1.0 (POODLE, fixes #730)
This commit is contained in:
parent
db6c0ebf76
commit
4f4392b83e
@ -5,6 +5,7 @@
|
||||
package cmd
|
||||
|
||||
import (
|
||||
"crypto/tls"
|
||||
"fmt"
|
||||
"html/template"
|
||||
"io/ioutil"
|
||||
@ -453,7 +454,9 @@ func runWeb(*cli.Context) {
|
||||
case setting.HTTP:
|
||||
err = http.ListenAndServe(listenAddr, m)
|
||||
case setting.HTTPS:
|
||||
err = http.ListenAndServeTLS(listenAddr, setting.CertFile, setting.KeyFile, m)
|
||||
cfg := &tls.Config{MinVersion: tls.VersionTLS10}
|
||||
server := &http.Server{Addr: listenAddr, TLSConfig: cfg, Handler: m}
|
||||
err = server.ListenAndServeTLS(setting.CertFile, setting.KeyFile)
|
||||
case setting.FCGI:
|
||||
err = fcgi.Serve(nil, m)
|
||||
default:
|
||||
|
Loading…
Reference in New Issue
Block a user