fix(api): grpc content type matcher all grpc types (#8285)

# Which Problems Are Solved

ZITADEL returned a 404 Unimplemented error if the client sent
'application/grpc+proto' or 'application/grpc+json' which are both valid
content types.

# How the Problems Are Solved

changed the header matcher to regexp

# Additional Context

Problem occured in
https://github.com/zitadel/typescript/tree/grpc-transport
This commit is contained in:
Silvan 2024-07-11 15:22:01 +02:00 committed by GitHub
parent 86c124955d
commit aa273ad000
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -180,7 +180,7 @@ func (a *API) RouteGRPC() {
Name("grpc")
http2Route.
Methods(http.MethodPost).
Headers("Content-Type", "application/grpc").
HeadersRegexp(http_util.ContentType, `application\/grpc(\+proto|\+json)?`).
Handler(a.grpcServer)
a.routeGRPCWeb()