diff --git a/main.go b/main.go index b1d72ca..7a1a5a6 100644 --- a/main.go +++ b/main.go @@ -1074,7 +1074,7 @@ func main() { func wrapAuth(handler http.HandlerFunc) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { auth := r.Header.Get("Authorization") - if auth == "" || auth == "Token "+authToken { + if auth == "" || (authToken != "" && auth == "Token "+authToken) { r = r.WithContext(context.WithValue(r.Context(), authKey, auth != "")) // auth == "", require cookie in handler handler.ServeHTTP(w, r)