lets-go:10.5 tls config
This commit is contained in:
parent
f284b18ee4
commit
5d582a5971
@ -1,6 +1,7 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"crypto/tls"
|
||||
"database/sql"
|
||||
"flag"
|
||||
"html/template"
|
||||
@ -67,10 +68,15 @@ func main() {
|
||||
sessionManager: sessionManager,
|
||||
}
|
||||
|
||||
tlsConfig := &tls.Config{
|
||||
CurvePreferences: []tls.CurveID{tls.X25519, tls.CurveP256},
|
||||
}
|
||||
|
||||
srv := &http.Server{
|
||||
Addr: *addr,
|
||||
Handler: app.routes(),
|
||||
ErrorLog: slog.NewLogLogger(logger.Handler(), slog.LevelError),
|
||||
Addr: *addr,
|
||||
Handler: app.routes(),
|
||||
ErrorLog: slog.NewLogLogger(logger.Handler(), slog.LevelError),
|
||||
TLSConfig: tlsConfig,
|
||||
}
|
||||
|
||||
logger.Info("starting server", slog.String("addr", srv.Addr))
|
||||
|
Loading…
Reference in New Issue
Block a user