mirror of
https://github.com/coredns/coredns.git
synced 2025-12-08 19:35:10 -05:00
Add set EDNS0 with variable substitution (#937)
* Add set EDNS0 with variable substitution
* Change variable from $ to {}. Un-export constants
* Update README
* Change getRuleData() to ruleData(); Change to use string match from regexp
This commit is contained in:
@@ -15,7 +15,7 @@ func newNameRule(from, to string) (Rule, error) {
|
||||
}
|
||||
|
||||
// Rewrite rewrites the the current request.
|
||||
func (rule *nameRule) Rewrite(r *dns.Msg) Result {
|
||||
func (rule *nameRule) Rewrite(w dns.ResponseWriter, r *dns.Msg) Result {
|
||||
if rule.From == r.Question[0].Name {
|
||||
r.Question[0].Name = rule.To
|
||||
return RewriteDone
|
||||
|
||||
Reference in New Issue
Block a user