mirror of
https://github.com/coredns/coredns.git
synced 2025-11-24 04:34:01 -05:00
middleware/cache: don't cache expired RRSIGs (#641)
Check message for expired sig and don't cache those. Aside: This hack of caching entire messages is probably something we should stop doing at some point in the future and do this on a per RRset basis. Fixes #367 #635
This commit is contained in:
@@ -52,7 +52,8 @@ func (l Logger) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg)
|
||||
rc = 0
|
||||
}
|
||||
|
||||
class, _ := response.Classify(rrw.Msg)
|
||||
tpe, _ := response.Typify(rrw.Msg, time.Now().UTC())
|
||||
class := response.Classify(tpe)
|
||||
if rule.Class == response.All || rule.Class == class {
|
||||
rep := replacer.New(r, rrw, CommonLogEmptyValue)
|
||||
rule.Log.Println(rep.Replace(rule.Format))
|
||||
|
||||
Reference in New Issue
Block a user