fix: del route

This commit is contained in:
tbphp
2025-07-09 16:38:42 +08:00
parent c214b8f66d
commit c2ab36912f

View File

@@ -134,7 +134,7 @@ func Auth(config types.AuthConfig) gin.HandlerFunc {
// Skip authentication for management endpoints // Skip authentication for management endpoints
path := c.Request.URL.Path path := c.Request.URL.Path
if path == "/health" || path == "/stats" || path == "/blacklist" || path == "/reset-keys" { if path == "/health" || path == "/stats" {
c.Next() c.Next()
return return
} }
@@ -208,7 +208,7 @@ func ErrorHandler() gin.HandlerFunc {
// isMonitoringEndpoint checks if the path is a monitoring endpoint // isMonitoringEndpoint checks if the path is a monitoring endpoint
func isMonitoringEndpoint(path string) bool { func isMonitoringEndpoint(path string) bool {
monitoringPaths := []string{"/health", "/stats", "/blacklist", "/reset-keys"} monitoringPaths := []string{"/health", "/stats"}
for _, monitoringPath := range monitoringPaths { for _, monitoringPath := range monitoringPaths {
if path == monitoringPath { if path == monitoringPath {
return true return true