Output NetBird daemon and CLI versions on status command (#408)

This commit is contained in:
Misha Bragin
2022-08-01 12:42:45 +02:00
committed by GitHub
parent c13288781f
commit 851de3fd4e
5 changed files with 148 additions and 130 deletions

View File

@@ -279,7 +279,6 @@ func handlerFunc(gRPCHandler *grpc.Server, httpHandler http.Handler) http.Handle
return http.HandlerFunc(func(writer http.ResponseWriter, request *http.Request) {
grpcHeader := strings.HasPrefix(request.Header.Get("Content-Type"), "application/grpc") ||
strings.HasPrefix(request.Header.Get("Content-Type"), "application/grpc+proto")
fmt.Println(grpcHeader)
if request.ProtoMajor == 2 && grpcHeader {
gRPCHandler.ServeHTTP(writer, request)
} else {