mirror of
				https://github.com/coredns/coredns.git
				synced 2025-10-30 17:53:21 -04: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:
		| @@ -35,7 +35,7 @@ type Rewrite struct { | ||||
| func (rw Rewrite) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (int, error) { | ||||
| 	wr := NewResponseReverter(w, r) | ||||
| 	for _, rule := range rw.Rules { | ||||
| 		switch result := rule.Rewrite(r); result { | ||||
| 		switch result := rule.Rewrite(w, r); result { | ||||
| 		case RewriteDone: | ||||
| 			if rw.noRevert { | ||||
| 				return middleware.NextOrFailure(rw.Name(), rw.Next, ctx, w, r) | ||||
| @@ -59,7 +59,7 @@ func (rw Rewrite) Name() string { return "rewrite" } | ||||
| // Rule describes a rewrite rule. | ||||
| type Rule interface { | ||||
| 	// Rewrite rewrites the current request. | ||||
| 	Rewrite(*dns.Msg) Result | ||||
| 	Rewrite(dns.ResponseWriter, *dns.Msg) Result | ||||
| } | ||||
|  | ||||
| func newRule(args ...string) (Rule, error) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user