Cleanup docs and the chaos middleware

Make the CH middleware actually work. Needs a bit of a hack to route

the fake version.bind and friends zone to the correct handler. Fiddle

with the order in directive.go so that CH queries get logged as well.



Secondly add class rewriting to the rewrite middleware handler and also

log the class by default.
This commit is contained in:
Miek Gieben
2016-04-04 15:45:17 +01:00
parent 45ac2dd0c0
commit 6445a3f2f0
10 changed files with 60 additions and 20 deletions

View File

@@ -51,17 +51,16 @@ var directiveOrder = []directive{
{"shutdown", setup.Shutdown},
// Directives that inject handlers (middleware)
{"log", setup.Log},
{"prometheus", setup.Prometheus},
{"chaos", setup.Chaos},
{"rewrite", setup.Rewrite},
{"loadbalance", setup.Loadbalance},
{"log", setup.Log},
{"errors", setup.Errors},
{"file", setup.File},
{"chaos", setup.Chaos},
{"secondary", setup.Secondary},
{"etcd", setup.Etcd},
{"proxy", setup.Proxy},
{"errors", setup.Errors},
}
// RegisterDirective adds the given directive to caddy's list of directives.