net/http/pprof

This commit is contained in:
xmdhs 2023-10-13 16:31:06 +08:00
parent c06bf9e715
commit ec58bebe78
No known key found for this signature in database
GPG Key ID: E809D6D43DEFCC95

View File

@ -31,6 +31,10 @@ func NewRoute(handelY *yggdrasil.Yggdrasil, handel *handle.Handel, c config.Conf
r.Mount("/api/v1", newSkinApi(handel)) r.Mount("/api/v1", newSkinApi(handel))
r.Mount("/api/yggdrasil", newYggdrasil(handelY)) r.Mount("/api/yggdrasil", newYggdrasil(handelY))
if c.Debug {
r.Mount("/debug", middleware.Profiler())
}
r.Get("/texture/*", handelY.TextureAssets()) r.Get("/texture/*", handelY.TextureAssets())
return r return r