coredns plugin -- Add option "blocked_ttl" that can change default nxdomain response TTL

This commit is contained in:
Eugene Bujak
2018-09-26 18:27:31 +03:00
parent c9e10c9de7
commit c7790a8d9f
2 changed files with 20 additions and 7 deletions

View File

@@ -40,6 +40,7 @@ type coreDNSConfig struct {
SafeSearchEnabled bool `yaml:"safesearch_enabled"`
ParentalEnabled bool `yaml:"parental_enabled"`
ParentalSensitivity int `yaml:"parental_sensitivity"`
BlockedResponseTTL int `yaml:"blocked_response_ttl"`
QueryLogEnabled bool `yaml:"querylog_enabled"`
Pprof string `yaml:"-"`
Cache string `yaml:"-"`
@@ -70,6 +71,7 @@ var config = configuration{
FilterFile: "dnsfilter.txt", // only filename, no path
FilteringEnabled: true,
SafeBrowsingEnabled: true,
BlockedResponseTTL: 60, // in seconds
QueryLogEnabled: true,
UpstreamDNS: defaultDNS,
Cache: "cache",