Flatten HTTP handler config (#2662) (#2663)

Differentiating middleware and responders has one benefit, namely that
it's clear which module provides the response, but even then it's not
a great advantage. Linear handler config makes a little more sense,
giving greater flexibility and simplifying the core a bit, even though
it's slightly awkward that handlers which are responders may not use
the 'next' handler that is passed in at all.
This commit is contained in:
Matt Holt
2019-07-11 15:32:34 -06:00
committed by GitHub
parent 6dfba5fda8
commit 9343403358
9 changed files with 99 additions and 148 deletions

View File

@ -25,7 +25,7 @@ import (
func init() {
caddy.RegisterModule(caddy.Module{
Name: "http.middleware.rewrite",
Name: "http.handlers.rewrite",
New: func() interface{} { return new(Rewrite) },
})
}