mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 04:14:39 +03:00
Return 401 code for ErrUnauthorized (#4842)
This commit is contained in:
@@ -42,7 +42,7 @@ func authenticateHandler() func(http.Handler) http.Handler {
|
|||||||
|
|
||||||
userID, err := manager.GetInstance().SessionStore.Authenticate(w, r)
|
userID, err := manager.GetInstance().SessionStore.Authenticate(w, r)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if errors.Is(err, session.ErrUnauthorized) {
|
if !errors.Is(err, session.ErrUnauthorized) {
|
||||||
http.Error(w, err.Error(), http.StatusInternalServerError)
|
http.Error(w, err.Error(), http.StatusInternalServerError)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user