From 64f0173948e9b87a8f898d451ef35daefedf2c50 Mon Sep 17 00:00:00 2001 From: Matthew Holt Date: Sun, 12 Jan 2020 13:39:32 -0700 Subject: http: Fix subroutes, ensure that next handlers can still be called --- modules/caddyhttp/caddyhttp.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'modules/caddyhttp/caddyhttp.go') diff --git a/modules/caddyhttp/caddyhttp.go b/modules/caddyhttp/caddyhttp.go index 389a2d2..73c4863 100644 --- a/modules/caddyhttp/caddyhttp.go +++ b/modules/caddyhttp/caddyhttp.go @@ -172,7 +172,7 @@ func (app *App) Provision(ctx caddy.Context) error { } // pre-compile the handler chain, and be sure to wrap it in our // route handler so that important security checks are done, etc. - primaryRoute = srv.Routes.Compile() + primaryRoute = srv.Routes.Compile(emptyHandler) } srv.primaryHandlerChain = srv.wrapPrimaryRoute(primaryRoute) @@ -181,7 +181,7 @@ func (app *App) Provision(ctx caddy.Context) error { if err != nil { return fmt.Errorf("server %s: setting up server error handling routes: %v", srvName, err) } - srv.errorHandlerChain = srv.Errors.Routes.Compile() + srv.errorHandlerChain = srv.Errors.Routes.Compile(emptyHandler) } } @@ -546,7 +546,7 @@ func (app *App) automaticHTTPS() error { tlsApp: tlsApp, // required to solve HTTP challenge logger: app.logger.Named("log"), errorLogger: app.logger.Named("log.error"), - primaryHandlerChain: redirRoutes.Compile(), + primaryHandlerChain: redirRoutes.Compile(emptyHandler), } } } -- cgit v1.2.3