[server] Configure TLS next protos
This commit is contained in:
parent
f96b3d72ad
commit
7019c78c2e
1 changed files with 5 additions and 1 deletions
|
@ -1089,6 +1089,7 @@ func main_0 () (error) {
|
||||||
PreferServerCipherSuites : true,
|
PreferServerCipherSuites : true,
|
||||||
SessionTicketsDisabled : true,
|
SessionTicketsDisabled : true,
|
||||||
DynamicRecordSizingDisabled : true,
|
DynamicRecordSizingDisabled : true,
|
||||||
|
NextProtos : []string { "http/1.1", "http/1.0" },
|
||||||
}
|
}
|
||||||
|
|
||||||
if _certificate, _error := tls.X509KeyPair ([]byte (DefaultTlsCertificatePublic), []byte (DefaultTlsCertificatePrivate)); _error == nil {
|
if _certificate, _error := tls.X509KeyPair ([]byte (DefaultTlsCertificatePublic), []byte (DefaultTlsCertificatePrivate)); _error == nil {
|
||||||
|
@ -1133,7 +1134,7 @@ func main_0 () (error) {
|
||||||
_https2Server := & http.Server {
|
_https2Server := & http.Server {
|
||||||
|
|
||||||
Handler : _server,
|
Handler : _server,
|
||||||
TLSConfig : _tlsConfig.Clone (),
|
TLSConfig : nil,
|
||||||
|
|
||||||
MaxHeaderBytes : _httpsServer.ReadBufferSize,
|
MaxHeaderBytes : _httpsServer.ReadBufferSize,
|
||||||
|
|
||||||
|
@ -1144,6 +1145,9 @@ func main_0 () (error) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_https2Server.TLSConfig = _tlsConfig.Clone ()
|
||||||
|
_https2Server.TLSConfig.NextProtos = []string { "h2", "http/1.1", "http/1.0" }
|
||||||
|
|
||||||
if _timeoutDisabled {
|
if _timeoutDisabled {
|
||||||
|
|
||||||
_httpServer.ReadTimeout = 0
|
_httpServer.ReadTimeout = 0
|
||||||
|
|
Loading…
Reference in a new issue