mirror of
				https://github.com/coredns/coredns.git
				synced 2025-10-30 09:43:17 -04:00 
			
		
		
		
	Enable HTTP/2 in grpc service (#4842)
Signed-off-by: Johnny Bergström <johnny@klaudify.se>
This commit is contained in:
		| @@ -40,6 +40,11 @@ func NewServergRPC(addr string, group []*Config) (*ServergRPC, error) { | |||||||
| 		// Should we error if some configs *don't* have TLS? | 		// Should we error if some configs *don't* have TLS? | ||||||
| 		tlsConfig = conf.TLSConfig | 		tlsConfig = conf.TLSConfig | ||||||
| 	} | 	} | ||||||
|  | 	// http/2 is required when using gRPC. We need to specify it in next protos | ||||||
|  | 	// or the upgrade won't happen. | ||||||
|  | 	if tlsConfig != nil { | ||||||
|  | 		tlsConfig.NextProtos = []string{"h2"} | ||||||
|  | 	} | ||||||
|  |  | ||||||
| 	return &ServergRPC{Server: s, tlsConfig: tlsConfig}, nil | 	return &ServergRPC{Server: s, tlsConfig: tlsConfig}, nil | ||||||
| } | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user