mirror of
https://github.com/coredns/coredns.git
synced 2025-10-27 08:14:18 -04:00
This commit is contained in:
committed by
Miek Gieben
parent
fc667b98e0
commit
4a3f5cc41e
@@ -80,7 +80,7 @@ func (rule *prefixNameRule) Rewrite(ctx context.Context, state request.Request)
|
||||
// Rewrite rewrites the current request when the name ends with the matching string.
|
||||
func (rule *suffixNameRule) Rewrite(ctx context.Context, state request.Request) Result {
|
||||
if strings.HasSuffix(state.Name(), rule.Suffix) {
|
||||
state.Req.Question[0].Name = strings.TrimRight(state.Name(), rule.Suffix) + rule.Replacement
|
||||
state.Req.Question[0].Name = strings.TrimSuffix(state.Name(), rule.Suffix) + rule.Replacement
|
||||
return RewriteDone
|
||||
}
|
||||
return RewriteIgnored
|
||||
|
||||
Reference in New Issue
Block a user