Files
imgproxy/pprof.go
Victor Sokolov 2d9ad5c250 IMG-49: Introduced instance (#1512)
* Introduced instance

* Makefile changes
2025-09-09 15:11:37 +02:00

23 lines
254 B
Go

//go:build pprof
// +build pprof
package imgproxy
import (
"net/http"
_ "net/http/pprof"
"os"
)
func init() {
bind := os.Getenv("IMGPROXY_PPROF_BIND")
if len(bind) == 0 {
bind = ":8088"
}
go func() {
http.ListenAndServe(bind, nil)
}()
}