mirror of
https://github.com/pomerium/pomerium.git
synced 2025-04-29 02:16:28 +02:00
authorize: do not send redirects to gRPC (#2314)
This commit is contained in:
parent
448286ffbc
commit
7d0db7d8ff
1 changed files with 5 additions and 0 deletions
|
@ -192,6 +192,10 @@ func shouldRedirect(in *envoy_service_auth_v3.CheckRequest) bool {
|
|||
return true
|
||||
}
|
||||
|
||||
if strings.HasPrefix(requestHeaders["content-type"], "application/grpc") {
|
||||
return false
|
||||
}
|
||||
|
||||
a, err := rfc7231.ParseAccept(requestHeaders["accept"])
|
||||
if err != nil {
|
||||
return true
|
||||
|
@ -203,6 +207,7 @@ func shouldRedirect(in *envoy_service_auth_v3.CheckRequest) bool {
|
|||
"text/plain",
|
||||
"application/grpc-web-text",
|
||||
"application/grpc-web+proto",
|
||||
"application/grpc+proto",
|
||||
})
|
||||
if !ok {
|
||||
return true
|
||||
|
|
Loading…
Add table
Reference in a new issue