diff --git a/http.go b/http.go index 86be3c7..ad25208 100644 --- a/http.go +++ b/http.go @@ -247,7 +247,10 @@ func (s *Server) Setup() { site.Init(group) } for _, middleware := range s.advmiddleware { - middleware.Sites(maptoarray(s.sites)) + if err := middleware.Sites(maptoarray(s.sites)); err != nil { + log.Error().Err(err).Msg("Failed to setup midddleware. Stopping with the setup") + return + } } for cfg, site = range s.sites { config := s.Conf.Sites[cfg]