mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 13:27:34 +00:00
fix: correctly differ between grpc and grpc-web (#8292)
# Which Problems Are Solved
While #8285 also checked for `+proto` and `+json` grpc content types, it
accidentally matched all grpc-web requests to grpc.
# How the Problems Are Solved
- fixed the regex by checking for an exact match (added start `^` and
end `$` anchors)
# Additional Changes
None
# Additional Context
- relates to #8285
(cherry picked from commit d7c0ec282a
)
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).
|
||||||
HeadersRegexp(http_util.ContentType, `application\/grpc(\+proto|\+json)?`).
|
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