From 84ce2c0c4da704797286fdd9259604c428ae8ab8 Mon Sep 17 00:00:00 2001 From: Hugh <64899484@qq.com> Date: Fri, 2 Jul 2021 13:05:34 +0800 Subject: [PATCH] fix: supper grpc and grpc web fix: supper grpc and grpc web --- context/context.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/context/context.go b/context/context.go index 96414fb9..6c40fde6 100644 --- a/context/context.go +++ b/context/context.go @@ -1178,7 +1178,7 @@ func (ctx *Context) IsHTTP2() bool { // IsGRPC reports whether the request came from a gRPC client. func (ctx *Context) IsGRPC() bool { - return ctx.IsHTTP2() && ctx.GetContentTypeRequested() == ContentGRPCHeaderValue + return ctx.IsHTTP2() && strings.Contains(ctx.GetContentTypeRequested(), ContentGRPCHeaderValue) } type (