fixed conflict

This commit is contained in:
Rahul Somasundaram 2022-10-04 08:38:51 +05:30
commit 8a924cb4ed
No known key found for this signature in database
GPG key ID: AA8F0B27E83147BD
4 changed files with 33 additions and 2 deletions
internal/home

View file

@ -57,6 +57,9 @@ type webConfig struct {
firstRun bool
serveHTTP3 bool
// ciphers specified by user
tlsCiphers []string
}
// httpsServer contains the data for the HTTPS server.
@ -288,6 +291,14 @@ func (web *Web) tlsServerLoop() {
web.httpsServer.cond.L.Unlock()
var cipher []uint16
if len(web.conf.tlsCiphers) == 0 {
cipher = aghtls.SaferCipherSuites()
} else {
cipher = aghtls.UserPreferredCipherSuites(web.conf.tlsCiphers)
}
addr := netutil.JoinHostPort(web.conf.BindHost.String(), web.conf.PortHTTPS)
web.httpsServer.server = &http.Server{
ErrorLog: log.StdLog("web: https", log.DEBUG),
@ -295,7 +306,7 @@ func (web *Web) tlsServerLoop() {
TLSConfig: &tls.Config{
Certificates: []tls.Certificate{web.httpsServer.cert},
RootCAs: Context.tlsRoots,
CipherSuites: aghtls.SaferCipherSuites(),
CipherSuites: cipher,
MinVersion: tls.VersionTLS12,
},
Handler: withMiddlewares(Context.mux, limitRequestBody),