1
0
mirror of https://github.com/oauth2-proxy/oauth2-proxy.git synced 2025-06-15 00:15:00 +02:00

fix: do not add Cache-Control header to response from auth only endpoint

fix #661
related #453
This commit is contained in:
Mitsuo Heijo
2020-07-06 19:04:31 +09:00
parent 215aeec8b9
commit 4c1047866b
2 changed files with 62 additions and 11 deletions

View File

@ -679,7 +679,7 @@ func prepareNoCache(w http.ResponseWriter) {
}
func (p *OAuthProxy) ServeHTTP(rw http.ResponseWriter, req *http.Request) {
if strings.HasPrefix(req.URL.Path, p.ProxyPrefix) {
if req.URL.Path != p.AuthOnlyPath && strings.HasPrefix(req.URL.Path, p.ProxyPrefix) {
prepareNoCache(rw)
}