@@ 285,7 285,6 @@ func (s *Server) WithDefaultMiddleware() *Server {
s.e.Pre(middleware.RemoveTrailingSlashWithConfig(middleware.TrailingSlashConfig{
RedirectCode: http.StatusMovedPermanently,
}))
- s.e.Use(session.LoadAndSave(s.Session)) // Must be first
// Set custom context
s.e.Use(func(next echo.HandlerFunc) echo.HandlerFunc {
return func(c echo.Context) error {
@@ 293,6 292,7 @@ func (s *Server) WithDefaultMiddleware() *Server {
return next(ctx)
}
})
+ s.e.Use(session.LoadAndSave(s.Session)) // Must be first
s.e.Use(
middleware.RecoverWithConfig(middleware.RecoverConfig{
StackSize: 32768, // 32KiB