summaryrefslogtreecommitdiff
path: root/metrics.go
diff options
context:
space:
mode:
authorTom Barrett <tom@tombarrett.xyz>2023-11-01 17:57:48 +0100
committerTom Barrett <tom@tombarrett.xyz>2023-11-01 18:11:33 +0100
commit240c3d1338415e5d82ef7ca0e52c4284be6441bd (patch)
tree4b0ee5d208c2cdffa78d65f1b0abe0ec85f15652 /metrics.go
parent73e78ab226f21e6c6c68961af88c4ab9c746f4f4 (diff)
parent0e204b730aa2b1fa0835336b1117eff8c420f713 (diff)
vbump to v2.7.5HEADcaddy-cgi
Diffstat (limited to 'metrics.go')
-rw-r--r--metrics.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/metrics.go b/metrics.go
index 325006f..0f8ea03 100644
--- a/metrics.go
+++ b/metrics.go
@@ -3,10 +3,11 @@ package caddy
import (
"net/http"
- "github.com/caddyserver/caddy/v2/internal/metrics"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/collectors"
"github.com/prometheus/client_golang/prometheus/promauto"
+
+ "github.com/caddyserver/caddy/v2/internal/metrics"
)
// define and register the metrics used in this package.
@@ -66,3 +67,9 @@ func (d *delegator) WriteHeader(code int) {
d.status = code
d.ResponseWriter.WriteHeader(code)
}
+
+// Unwrap returns the underlying ResponseWriter, necessary for
+// http.ResponseController to work correctly.
+func (d *delegator) Unwrap() http.ResponseWriter {
+ return d.ResponseWriter
+}