From 3b850734afbc0bca6de0b790a955abc86c951156 Mon Sep 17 00:00:00 2001 From: Will Norris Date: Sun, 13 Oct 2019 11:07:20 -0700 Subject: [PATCH] cmd/imageproxy: use http.DefaultServeMux this allows using the net/http/pprof package, and any other similar package that registers handlers on the default ServerMux. --- cmd/imageproxy/main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/imageproxy/main.go b/cmd/imageproxy/main.go index a31d520..fa74554 100644 --- a/cmd/imageproxy/main.go +++ b/cmd/imageproxy/main.go @@ -108,7 +108,8 @@ func main() { } fmt.Printf("imageproxy listening on %s\n", server.Addr) - log.Fatal(server.ListenAndServe()) + http.Handle("/", p) + log.Fatal(http.ListenAndServe(*addr, nil)) } // tieredCache allows specifying multiple caches via flags, which will create