internal: add more outpost tests, add support for X-Original-URL

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer
2022-01-24 20:50:13 +01:00
parent e70e031a1f
commit 07b09df3fe
5 changed files with 184 additions and 34 deletions

View File

@ -35,7 +35,7 @@ func (a *Application) configureProxy() error {
rp.ModifyResponse = a.proxyModifyResponse
a.mux.PathPrefix("/").HandlerFunc(func(rw http.ResponseWriter, r *http.Request) {
claims, err := a.getClaims(r)
if claims == nil && a.IsAllowlisted(r) {
if claims == nil && a.IsAllowlisted(r.URL) {
a.log.Trace("path can be accessed without authentication")
} else if claims == nil && err != nil {
a.redirectToStart(rw, r)