1
0
mirror of https://github.com/kataras/iris.git synced 2026-01-07 12:07:28 +00:00

Merge pull request #1785 from cq-z/master

fix: supper grpc and grpc web
This commit is contained in:
Gerasimos (Makis) Maropoulos
2021-07-05 20:07:37 +03:00
committed by GitHub

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 (