outposts/proxy: handle redirect loop in start handler, show error message

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer
2021-12-21 10:07:08 +01:00
parent e53114a645
commit f10b57ba0b
2 changed files with 7 additions and 5 deletions

View File

@ -60,11 +60,6 @@ func (a *Application) forwardHandleTraefik(rw http.ResponseWriter, r *http.Reque
s.Values[constants.SessionLoopDetection] = 1
} else {
s.Values[constants.SessionLoopDetection] = val.(int) + 1
if val.(int) > 10 {
a.log.Error("Stopped redirect loop")
rw.WriteHeader(http.StatusBadRequest)
return
}
}
}
err = s.Save(r, rw)