mirror of
https://github.com/pomerium/pomerium.git
synced 2025-08-02 16:30:17 +02:00
authorize: fix nginx infinite redirect (#2812)
This commit is contained in:
parent
9eccefbece
commit
8778097bb9
1 changed files with 4 additions and 4 deletions
|
@ -76,15 +76,15 @@ func (a *Authorize) Check(ctx context.Context, in *envoy_service_auth_v3.CheckRe
|
|||
return a.okResponse(res), nil
|
||||
}
|
||||
|
||||
if isForwardAuth && hreq.URL.Path == "/verify" {
|
||||
return a.deniedResponse(ctx, in, http.StatusUnauthorized, "Unauthenticated", nil)
|
||||
}
|
||||
|
||||
// if we're logged in, don't redirect, deny with forbidden
|
||||
if req.Session.ID != "" {
|
||||
return a.deniedResponse(ctx, in, denyStatusCode, denyStatusText, nil)
|
||||
}
|
||||
|
||||
if isForwardAuth && hreq.URL.Path == "/verify" {
|
||||
return a.deniedResponse(ctx, in, http.StatusUnauthorized, "Unauthenticated", nil)
|
||||
}
|
||||
|
||||
return a.requireLoginResponse(ctx, in)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue