1
0
mirror of https://github.com/kataras/iris.git synced 2026-01-08 20:41:57 +00:00

fix: supper grpc and grpc web

fix: supper grpc and grpc web
This commit is contained in:
Hugh
2021-07-02 13:05:34 +08:00
committed by GitHub
parent 6d3884b0ce
commit 84ce2c0c4d

View File

@@ -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 (