File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -76,7 +76,10 @@ type MiddlewareHandler interface {
76
76
}
77
77
78
78
// emptyHandler is used as a no-op handler.
79
- var emptyHandler Handler = HandlerFunc (func (http.ResponseWriter , * http.Request ) error { return nil })
79
+ var emptyHandler Handler = HandlerFunc (func (_ http.ResponseWriter , req * http.Request ) error {
80
+ SetVar (req .Context (), "unhandled" , true )
81
+ return nil
82
+ })
80
83
81
84
// An implicit suffix middleware that, if reached, sets the StatusCode to the
82
85
// error stored in the ErrorCtxKey. This is to prevent situations where the
@@ -120,7 +123,7 @@ type ResponseHandler struct {
120
123
Routes RouteList `json:"routes,omitempty"`
121
124
}
122
125
123
- // Provision sets up the routse in rh.
126
+ // Provision sets up the routes in rh.
124
127
func (rh * ResponseHandler ) Provision (ctx caddy.Context ) error {
125
128
if rh .Routes != nil {
126
129
err := rh .Routes .Provision (ctx )
You can’t perform that action at this time.
0 commit comments