fix
All checks were successful
release-tag / release-image (push) Successful in 2m6s

This commit is contained in:
2025-11-10 21:53:49 +01:00
parent 59556eae01
commit 6898fdd47e

View File

@@ -218,10 +218,6 @@ var (
// Prometheus Metriken
var (
checkRequests = prometheus.NewCounter(prometheus.CounterOpts{
Name: "ipcheck_requests_total",
Help: "Total IP check requests",
})
checkBlocked = prometheus.NewCounter(prometheus.CounterOpts{
Name: "ipcheck_blocked_total",
Help: "Total blocked IPs",
@@ -240,7 +236,7 @@ var (
)
func init() {
prometheus.MustRegister(checkRequests, checkBlocked, checkWhitelist, blocklistHashSizes)
prometheus.MustRegister(checkBlocked, checkWhitelist, blocklistHashSizes)
}
// Main
@@ -547,7 +543,6 @@ func handleCheck(w http.ResponseWriter, r *http.Request) {
Username: os.Getenv("REDIS_USER"),
Password: os.Getenv("REDIS_PASS"),
})
checkRequests.Inc()
ipStr := strings.TrimPrefix(r.URL.Path, "/check/")
ip, err := netip.ParseAddr(ipStr)
if err != nil {
@@ -590,8 +585,6 @@ func handleTraefik(w http.ResponseWriter, r *http.Request) {
Password: os.Getenv("REDIS_PASS"),
})
checkRequests.Inc()
ip, err := clientIPFromHeaders(r)
if err != nil {
http.Error(w, "invalid IP", http.StatusBadRequest)