aboutsummaryrefslogtreecommitdiff
path: root/core/dnsserver/config.go
diff options
context:
space:
mode:
Diffstat (limited to 'core/dnsserver/config.go')
-rw-r--r--core/dnsserver/config.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/core/dnsserver/config.go b/core/dnsserver/config.go
index c34398b39..3da86271e 100644
--- a/core/dnsserver/config.go
+++ b/core/dnsserver/config.go
@@ -1,12 +1,14 @@
package dnsserver
import (
+ "context"
"crypto/tls"
"fmt"
"net/http"
"github.com/coredns/caddy"
"github.com/coredns/coredns/plugin"
+ "github.com/coredns/coredns/request"
)
// Config configuration for a single server.
@@ -40,6 +42,14 @@ type Config struct {
// may depend on it.
HTTPRequestValidateFunc func(*http.Request) bool
+ // FilterFuncs is used to further filter access
+ // to this handler. E.g. to limit access to a reverse zone
+ // on a non-octet boundary, i.e. /17
+ FilterFuncs []FilterFunc
+
+ // ViewName is the name of the Viewer PLugin defined in the Config
+ ViewName string
+
// TLSConfig when listening for encrypted connections (gRPC, DNS-over-TLS).
TLSConfig *tls.Config
@@ -60,8 +70,14 @@ type Config struct {
// firstConfigInBlock is used to reference the first config in a server block, for the
// purpose of sharing single instance of each plugin among all zones in a server block.
firstConfigInBlock *Config
+
+ // metaCollector references the first MetadataCollector plugin, if one exists
+ metaCollector MetadataCollector
}
+// FilterFunc is a function that filters requests from the Config
+type FilterFunc func(context.Context, *request.Request) bool
+
// keyForConfig builds a key for identifying the configs during setup time
func keyForConfig(blocIndex int, blocKeyIndex int) string {
return fmt.Sprintf("%d:%d", blocIndex, blocKeyIndex)