From c82c231ba7ec7c400e4d48ab943f57a6b29a2a2a Mon Sep 17 00:00:00 2001 From: Matthew Holt Date: Thu, 17 Sep 2020 17:23:58 -0600 Subject: caddyhttp: Remove server name from metrics For some reason this breaks automatic HTTP->HTTPS redirects. I am not sure why yet, but as a hotfix remove this until we understand it better. --- modules/caddyhttp/metrics.go | 4 ---- 1 file changed, 4 deletions(-) (limited to 'modules/caddyhttp/metrics.go') diff --git a/modules/caddyhttp/metrics.go b/modules/caddyhttp/metrics.go index dbf1033..2b3b7c7 100644 --- a/modules/caddyhttp/metrics.go +++ b/modules/caddyhttp/metrics.go @@ -94,10 +94,6 @@ func serverNameFromContext(ctx context.Context) string { return srvName } -func contextWithServerName(ctx context.Context, serverName string) context.Context { - return context.WithValue(ctx, ctxKeyServerName{}, serverName) -} - type metricsInstrumentedHandler struct { labels prometheus.Labels statusLabels prometheus.Labels -- cgit v1.2.3