mirror of
https://github.com/usememos/memos.git
synced 2026-12-04 10:34:21 +01:00
fix: disable profiler in production mode (#4925)
This commit is contained in:
1 parent
9971cbeed4
commit
e724a7ef72
1 file changed
+6
-4
+6
-4
@@ -52,10 +52,12 @@ func NewServer(ctx context.Context, profile *profile.Profile, store *store.Store
|
||||
echoServer.Use(middleware.Recover())
|
||||
s.echoServer = echoServer
|
||||
|
||||
// Initialize profiler
|
||||
s.profiler = profiler.NewProfiler()
|
||||
s.profiler.RegisterRoutes(echoServer)
|
||||
s.profiler.StartMemoryMonitor(ctx)
|
||||
if profile.Mode != "prod" {
|
||||
// Initialize profiler
|
||||
s.profiler = profiler.NewProfiler()
|
||||
s.profiler.RegisterRoutes(echoServer)
|
||||
s.profiler.StartMemoryMonitor(ctx)
|
||||
}
|
||||
|
||||
workspaceBasicSetting, err := s.getOrUpsertWorkspaceBasicSetting(ctx)
|
||||
if err != nil {
|
||||
|
||||
Reference in new issue
Block a user