You've already forked imgproxy
mirror of
https://github.com/imgproxy/imgproxy.git
synced 2025-11-29 23:07:40 +02:00
22 lines
233 B
Go
22 lines
233 B
Go
|
|
// +build pprof
|
||
|
|
|
||
|
|
package main
|
||
|
|
|
||
|
|
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)
|
||
|
|
}()
|
||
|
|
}
|