Skip to content

Commit

Permalink
normalize domain name
Browse files Browse the repository at this point in the history
  • Loading branch information
mohammed90 authored Oct 7, 2024
1 parent 863cada commit 765d018
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions modules/caddyhttp/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"errors"
"net/http"
"strings"
"sync"
"time"

Expand Down Expand Up @@ -133,8 +134,8 @@ func (h *metricsInstrumentedHandler) ServeHTTP(w http.ResponseWriter, r *http.Re
statusLabels := prometheus.Labels{"server": server, "handler": h.handler, "method": method, "code": ""}

if h.metrics.PerHost {
labels["host"] = r.Host
statusLabels["host"] = r.Host
labels["host"] = strings.ToLower(r.Host)
statusLabels["host"] = strings.ToLower(r.Host)
}

inFlight := h.metrics.httpMetrics.requestInFlight.With(labels)
Expand Down

0 comments on commit 765d018

Please sign in to comment.