Skip to content

Instantly share code, notes, and snippets.

@RobinHAEVG
RobinHAEVG / https-server.go
Last active April 21, 2021 10:39
Golang Secure HTTPS Server
tlsConfig := &tls.Config{
MinVersion: tls.VersionTLS12,
CurvePreferences: []tls.CurveID{tls.CurveP521, tls.CurveP384, tls.CurveP256},
PreferServerCipherSuites: true,
CipherSuites: []uint16{
tls.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,
tls.TLS_RSA_WITH_AES_256_GCM_SHA384,
},
}