middlewware/startup|shutdown (#604)
Add middleware by directly linking it from caddy, i.e. without any code changes. To be fair: this does not added a ServeHTTP, but does give some nice features in the Corefile.
This commit is contained in:
parent
7dc431ada3
commit
830fdfd26d
3 changed files with 5 additions and 0 deletions
|
@ -34,4 +34,6 @@ var directives = []string{
|
||||||
"proxy",
|
"proxy",
|
||||||
"whoami",
|
"whoami",
|
||||||
"erratic",
|
"erratic",
|
||||||
|
"startup",
|
||||||
|
"shutdown",
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,4 +27,5 @@ import (
|
||||||
_ "github.com/coredns/coredns/middleware/tls"
|
_ "github.com/coredns/coredns/middleware/tls"
|
||||||
_ "github.com/coredns/coredns/middleware/trace"
|
_ "github.com/coredns/coredns/middleware/trace"
|
||||||
_ "github.com/coredns/coredns/middleware/whoami"
|
_ "github.com/coredns/coredns/middleware/whoami"
|
||||||
|
_ "github.com/mholt/caddy/startupshutdown"
|
||||||
)
|
)
|
||||||
|
|
|
@ -42,3 +42,5 @@
|
||||||
200:proxy:proxy
|
200:proxy:proxy
|
||||||
210:whoami:whoami
|
210:whoami:whoami
|
||||||
220:erratic:erratic
|
220:erratic:erratic
|
||||||
|
500:startup:github.com/mholt/caddy/startupshutdown
|
||||||
|
510:shutdown:github.com/mholt/caddy/startupshutdown
|
||||||
|
|
Loading…
Add table
Reference in a new issue