fix: do not trigger oauth flow for /share/ paths

This commit is contained in:
Marcell FÜLÖP 2023-02-20 12:39:06 +00:00
parent 5c861df64c
commit f29f9f28fd

View File

@ -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
}