aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorAlexander NeonXP Kiryukhin <i@neonxp.ru>2024-07-30 00:46:05 +0300
committerAlexander NeonXP Kiryukhin <i@neonxp.ru>2024-07-30 00:46:05 +0300
commit48a84eb03f6b17ee41d6f097c78d89488ba14e8c (patch)
tree5cef9486cf2bb07d828bfebe12e835e40f7f16f0 /app
parent96e2ce2e9d363a6296f9411ecb00168520258874 (diff)
Обновил сессии
Diffstat (limited to 'app')
-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))