mirror of
https://github.com/muety/wakapi.git
synced 2023-08-10 21:12:56 +03:00
refctor: change active users query
This commit is contained in:
@ -57,7 +57,7 @@ func (m *AuthenticateMiddleware) ServeHTTP(w http.ResponseWriter, r *http.Reques
|
||||
|
||||
if m.redirectTarget == "" {
|
||||
w.WriteHeader(http.StatusUnauthorized)
|
||||
w.Write([]byte("401 unauthorized"))
|
||||
w.Write([]byte(conf.ErrUnauthorized))
|
||||
} else {
|
||||
http.SetCookie(w, m.config.GetClearCookie(models.AuthCookieKey, "/"))
|
||||
http.Redirect(w, r, m.redirectTarget, http.StatusFound)
|
||||
|
Reference in New Issue
Block a user