mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-07 04:40:05 -06:00
undo pprof endpoint
This commit is contained in:
@@ -2,11 +2,8 @@ package command
|
||||
|
||||
import (
|
||||
"context"
|
||||
gohttp "net/http"
|
||||
_ "net/http/pprof"
|
||||
"os"
|
||||
"os/signal"
|
||||
"runtime"
|
||||
"strings"
|
||||
|
||||
"github.com/micro/cli/v2"
|
||||
@@ -112,11 +109,6 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
cancel()
|
||||
})
|
||||
}
|
||||
runtime.SetBlockProfileRate(1)
|
||||
runtime.SetMutexProfileFraction(1)
|
||||
go func() {
|
||||
gohttp.ListenAndServe(":8887", nil)
|
||||
}()
|
||||
|
||||
return gr.Run()
|
||||
},
|
||||
|
||||
@@ -1,12 +1,7 @@
|
||||
package http
|
||||
|
||||
import (
|
||||
_ "net/http/pprof"
|
||||
|
||||
ghttp "net/http"
|
||||
|
||||
"github.com/go-chi/chi"
|
||||
cmw "github.com/go-chi/chi/middleware"
|
||||
"github.com/owncloud/ocis/accounts/pkg/assets"
|
||||
"github.com/owncloud/ocis/accounts/pkg/proto/v0"
|
||||
"github.com/owncloud/ocis/accounts/pkg/version"
|
||||
@@ -32,9 +27,6 @@ func Server(opts ...Option) http.Service {
|
||||
|
||||
mux := chi.NewMux()
|
||||
|
||||
mux.Use(func(next ghttp.Handler) ghttp.Handler {
|
||||
return cmw.Profiler()
|
||||
})
|
||||
mux.Use(middleware.RealIP)
|
||||
mux.Use(middleware.RequestID)
|
||||
mux.Use(middleware.NoCache)
|
||||
|
||||
Reference in New Issue
Block a user