mirror of
https://github.com/pomerium/pomerium.git
synced 2025-05-02 20:06:03 +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
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if strings.HasPrefix(requestHeaders["content-type"], "application/grpc") {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
a, err := rfc7231.ParseAccept(requestHeaders["accept"])
|
a, err := rfc7231.ParseAccept(requestHeaders["accept"])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return true
|
return true
|
||||||
|
@ -203,6 +207,7 @@ func shouldRedirect(in *envoy_service_auth_v3.CheckRequest) bool {
|
||||||
"text/plain",
|
"text/plain",
|
||||||
"application/grpc-web-text",
|
"application/grpc-web-text",
|
||||||
"application/grpc-web+proto",
|
"application/grpc-web+proto",
|
||||||
|
"application/grpc+proto",
|
||||||
})
|
})
|
||||||
if !ok {
|
if !ok {
|
||||||
return true
|
return true
|
||||||
|
|
Loading…
Add table
Reference in a new issue