fix: simplify bool comparison
This commit is contained in:
parent
6e8dc6bfa6
commit
11711e23ff
@ -84,7 +84,7 @@ func handleWithStaticData(w http.ResponseWriter, r *http.Request, d *data, fSys
|
|||||||
cookie, _ := r.Cookie("auth")
|
cookie, _ := r.Cookie("auth")
|
||||||
public := strings.HasPrefix(r.URL.Path, "/share/") && r.Method == "GET"
|
public := strings.HasPrefix(r.URL.Path, "/share/") && r.Method == "GET"
|
||||||
|
|
||||||
if cookie == nil && public == false {
|
if cookie == nil && !public {
|
||||||
auther.OIDC.InitAuthFlow(w, r)
|
auther.OIDC.InitAuthFlow(w, r)
|
||||||
return 0, nil
|
return 0, nil
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user