mirror of
https://github.com/zitadel/zitadel.git
synced 2025-06-11 10:28:37 +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 d7c0ec282ae34773d682e60f79bc9723e8f4c9ec)
This commit is contained in:
parent
7cb16ef982
commit
d85af6ad9f
@ -180,7 +180,7 @@ func (a *API) RouteGRPC() {
|
||||
Name("grpc")
|
||||
http2Route.
|
||||
Methods(http.MethodPost).
|
||||
HeadersRegexp(http_util.ContentType, `application\/grpc(\+proto|\+json)?`).
|
||||
HeadersRegexp(http_util.ContentType, `^application\/grpc(\+proto|\+json)?$`).
|
||||
Handler(a.grpcServer)
|
||||
|
||||
a.routeGRPCWeb()
|
||||
|
Loading…
x
Reference in New Issue
Block a user