authorize: only redirect for HTML pages (#2264)

* authorize: only redirect for HTML pages

* authorize: only redirect for HTML pages
This commit is contained in:
Caleb Doxsey 2021-06-02 16:18:02 -06:00 committed by GitHub
parent 513859665a
commit 9dc90d02d0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 74 additions and 2 deletions

View file

@ -84,7 +84,7 @@ func (a *Authorize) Check(ctx context.Context, in *envoy_service_auth_v3.CheckRe
return a.deniedResponse(ctx, in, http.StatusForbidden, http.StatusText(http.StatusForbidden), nil)
}
return a.redirectResponse(ctx, in)
return a.requireLoginResponse(ctx, in)
}
func getForwardAuthURL(r *http.Request) *url.URL {