mirror of
				https://github.com/NginxProxyManager/nginx-proxy-manager.git
				synced 2025-10-30 15:23:34 +00:00 
			
		
		
		
	Fix SSE frontend auth
This commit is contained in:
		| @@ -26,14 +26,14 @@ func SSEAuth(next http.Handler) http.Handler { | ||||
| 			return | ||||
| 		} | ||||
|  | ||||
| 		if claims != nil { | ||||
| 		if claims == nil { | ||||
| 			h.ResultErrorJSON(w, r, http.StatusUnauthorized, "Unauthorised", nil) | ||||
| 			return | ||||
| 		} | ||||
|  | ||||
| 		userID := uint(claims["uid"].(float64)) | ||||
| 		_, enabled, _ := user.IsEnabled(userID) | ||||
| 		if token == nil || !enabled { | ||||
| 		if !enabled { | ||||
| 			h.ResultErrorJSON(w, r, http.StatusUnauthorized, "Unauthorised", nil) | ||||
| 			return | ||||
| 		} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user