mirror of
https://github.com/zitadel/zitadel.git
synced 2025-04-07 09:34:32 +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
This commit is contained in:
parent
aa273ad000
commit
d7c0ec282a
@ -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()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user