From f29f9f28fdd4be79792af0dae723866a297e5379 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcell=20F=C3=9CL=C3=96P?= Date: Mon, 20 Feb 2023 12:39:06 +0000 Subject: [PATCH] fix: do not trigger oauth flow for /share/ paths --- http/static.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/http/static.go b/http/static.go index fd778e82..aa158c4f 100644 --- a/http/static.go +++ b/http/static.go @@ -82,8 +82,9 @@ func handleWithStaticData(w http.ResponseWriter, r *http.Request, d *data, fSys auther := raw.(*auth.OIDCAuth) cookie, _ := r.Cookie("auth") - - if cookie == nil { + public := strings.HasPrefix(r.URL.Path, "/share/") && r.Method == "GET" + + if cookie == nil && public == false { auther.OIDC.InitAuthFlow(w, r) return 0, nil }