mirror of
https://github.com/caddyserver/caddy.git
synced 2025-05-28 22:55:50 +08:00
Added flag to disable http/2 support (still enabled by default)
This commit is contained in:
7
main.go
7
main.go
@ -9,10 +9,14 @@ import (
|
||||
"github.com/mholt/caddy/server"
|
||||
)
|
||||
|
||||
var conf string
|
||||
var (
|
||||
conf string
|
||||
http2 bool
|
||||
)
|
||||
|
||||
func init() {
|
||||
flag.StringVar(&conf, "conf", server.DefaultConfigFile, "the configuration file to use")
|
||||
flag.BoolVar(&http2, "http2", true, "enable HTTP/2 support") // flag temporary until http2 merged into std lib
|
||||
}
|
||||
|
||||
func main() {
|
||||
@ -34,6 +38,7 @@ func main() {
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
s.HTTP2 = http2
|
||||
wg.Add(1)
|
||||
go func(s *server.Server) {
|
||||
defer wg.Done()
|
||||
|
Reference in New Issue
Block a user