From 2589f42da50e0d69a94c53d8ab7a238341653d80 Mon Sep 17 00:00:00 2001 From: Sebastian Tobie Date: Thu, 11 Nov 2021 23:18:16 +0100 Subject: [PATCH] errors in the configuration of the middleware are critical now. --- http.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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]