You've already forked filebrowser
mirror of
https://github.com/filebrowser/filebrowser.git
synced 2025-11-26 14:25:26 +08:00
fix: expired token error
This commit is contained in:
@@ -71,7 +71,7 @@ func withUser(fn handleFunc) handleFunc {
|
||||
token, err := request.ParseFromRequest(r, &extractor{}, keyFunc, request.WithClaims(&tk))
|
||||
|
||||
if err != nil || !token.Valid {
|
||||
return http.StatusForbidden, nil
|
||||
return http.StatusUnauthorized, nil
|
||||
}
|
||||
|
||||
expired := !tk.VerifyExpiresAt(time.Now().Add(time.Hour).Unix(), true)
|
||||
|
||||
Reference in New Issue
Block a user