aboutsummaryrefslogtreecommitdiff
path: root/app/cmd/serve.go
diff options
context:
space:
mode:
Diffstat (limited to 'app/cmd/serve.go')
-rw-r--r--app/cmd/serve.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/app/cmd/serve.go b/app/cmd/serve.go
index 578de1e..4222580 100644
--- a/app/cmd/serve.go
+++ b/app/cmd/serve.go
@@ -95,12 +95,14 @@ func serve(ctx context.Context) error {
e.Handle("/assets/", http.StripPrefix("/assets", http.FileServerFS(assets.FS)))
+ sessionManager := session.New(session.NewBoltStore(orm, []byte("sessions")))
+
mh := mux.Use(e,
middleware.Logger(slog.Default()),
- middleware.Recover(slog.Default()),
+ // middleware.Recover(slog.Default()),
middleware.RequestID,
appmiddleware.UserMiddleware(),
- session.Middleware(session.DefaultConfig, session.NewBoltStore(orm, []byte("sessions"))),
+ sessionManager.Middleware(),
)
slog.InfoContext(ctx, "started gorum", slog.String("bind", listen))