mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 14:17:32 +00:00
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
(cherry picked from commit aa273ad000
)
This commit is contained in:
@@ -180,7 +180,7 @@ func (a *API) RouteGRPC() {
|
|||||||
Name("grpc")
|
Name("grpc")
|
||||||
http2Route.
|
http2Route.
|
||||||
Methods(http.MethodPost).
|
Methods(http.MethodPost).
|
||||||
Headers("Content-Type", "application/grpc").
|
HeadersRegexp(http_util.ContentType, `application\/grpc(\+proto|\+json)?`).
|
||||||
Handler(a.grpcServer)
|
Handler(a.grpcServer)
|
||||||
|
|
||||||
a.routeGRPCWeb()
|
a.routeGRPCWeb()
|
||||||
|
Reference in New Issue
Block a user