You've already forked golang-saas-starter-kit
mirror of
https://github.com/raseels-repos/golang-saas-starter-kit.git
synced 2025-08-06 22:32:51 +02:00
disable http2
This commit is contained in:
@ -95,7 +95,6 @@ func main() {
|
|||||||
Host string `default:"" envconfig:"HOST"`
|
Host string `default:"" envconfig:"HOST"`
|
||||||
ReadTimeout time.Duration `default:"5s" envconfig:"READ_TIMEOUT"`
|
ReadTimeout time.Duration `default:"5s" envconfig:"READ_TIMEOUT"`
|
||||||
WriteTimeout time.Duration `default:"5s" envconfig:"WRITE_TIMEOUT"`
|
WriteTimeout time.Duration `default:"5s" envconfig:"WRITE_TIMEOUT"`
|
||||||
DisableHTTP2 bool `default:"false" envconfig:"DISABLE_HTTP2"`
|
|
||||||
}
|
}
|
||||||
Service struct {
|
Service struct {
|
||||||
Name string `default:"web-api" envconfig:"SERVICE_NAME"`
|
Name string `default:"web-api" envconfig:"SERVICE_NAME"`
|
||||||
@ -601,9 +600,6 @@ func main() {
|
|||||||
}
|
}
|
||||||
api.TLSConfig = &tls.Config{GetCertificate: m.GetCertificate}
|
api.TLSConfig = &tls.Config{GetCertificate: m.GetCertificate}
|
||||||
api.TLSConfig.NextProtos = append(api.TLSConfig.NextProtos, acme.ALPNProto)
|
api.TLSConfig.NextProtos = append(api.TLSConfig.NextProtos, acme.ALPNProto)
|
||||||
if !cfg.HTTPS.DisableHTTP2 {
|
|
||||||
api.TLSConfig.NextProtos = append(api.TLSConfig.NextProtos, "h2")
|
|
||||||
}
|
|
||||||
|
|
||||||
httpServers = append(httpServers, api)
|
httpServers = append(httpServers, api)
|
||||||
|
|
||||||
|
@ -90,7 +90,6 @@ func main() {
|
|||||||
Host string `default:"" envconfig:"HOST"`
|
Host string `default:"" envconfig:"HOST"`
|
||||||
ReadTimeout time.Duration `default:"5s" envconfig:"READ_TIMEOUT"`
|
ReadTimeout time.Duration `default:"5s" envconfig:"READ_TIMEOUT"`
|
||||||
WriteTimeout time.Duration `default:"5s" envconfig:"WRITE_TIMEOUT"`
|
WriteTimeout time.Duration `default:"5s" envconfig:"WRITE_TIMEOUT"`
|
||||||
DisableHTTP2 bool `default:"false" envconfig:"DISABLE_HTTP2"`
|
|
||||||
}
|
}
|
||||||
Service struct {
|
Service struct {
|
||||||
Name string `default:"web-app" envconfig:"SERVICE_NAME"`
|
Name string `default:"web-app" envconfig:"SERVICE_NAME"`
|
||||||
@ -1010,9 +1009,6 @@ func main() {
|
|||||||
}
|
}
|
||||||
api.TLSConfig = &tls.Config{GetCertificate: m.GetCertificate}
|
api.TLSConfig = &tls.Config{GetCertificate: m.GetCertificate}
|
||||||
api.TLSConfig.NextProtos = append(api.TLSConfig.NextProtos, acme.ALPNProto)
|
api.TLSConfig.NextProtos = append(api.TLSConfig.NextProtos, acme.ALPNProto)
|
||||||
if !cfg.HTTPS.DisableHTTP2 {
|
|
||||||
api.TLSConfig.NextProtos = append(api.TLSConfig.NextProtos, "h2")
|
|
||||||
}
|
|
||||||
|
|
||||||
httpServers = append(httpServers, api)
|
httpServers = append(httpServers, api)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user