From 77bd7eaedea1ab7fb2112e070435091eeb4e7c36 Mon Sep 17 00:00:00 2001 From: Miek Gieben Date: Thu, 25 Jan 2018 11:02:51 +0000 Subject: [PATCH] Add on plugin (#1412) Enable this Caddy plugin by default. Docs will go up coredns.io for this as well. See https://caddyserver.com/docs/on --- core/dnsserver/zdirectives.go | 1 + core/plugin/zplugin.go | 1 + plugin.cfg | 1 + 3 files changed, 3 insertions(+) diff --git a/core/dnsserver/zdirectives.go b/core/dnsserver/zdirectives.go index 3b44e474a..82f26fe71 100644 --- a/core/dnsserver/zdirectives.go +++ b/core/dnsserver/zdirectives.go @@ -41,6 +41,7 @@ var Directives = []string{ "proxy", "erratic", "whoami", + "on", "startup", "shutdown", } diff --git a/core/plugin/zplugin.go b/core/plugin/zplugin.go index 478746455..8c8b92a46 100644 --- a/core/plugin/zplugin.go +++ b/core/plugin/zplugin.go @@ -35,5 +35,6 @@ import ( _ "github.com/coredns/coredns/plugin/tls" _ "github.com/coredns/coredns/plugin/trace" _ "github.com/coredns/coredns/plugin/whoami" + _ "github.com/mholt/caddy/onevent" _ "github.com/mholt/caddy/startupshutdown" ) diff --git a/plugin.cfg b/plugin.cfg index 77fdc282d..06e1de5f4 100644 --- a/plugin.cfg +++ b/plugin.cfg @@ -50,5 +50,6 @@ etcd:etcd proxy:proxy erratic:erratic whoami:whoami +on:github.com/mholt/caddy/onevent startup:github.com/mholt/caddy/startupshutdown shutdown:github.com/mholt/caddy/startupshutdown