Logo
Explore Help
Sign In
Mirrors/coredns
1
0
Fork 0
You've already forked coredns
mirror of https://github.com/coredns/coredns.git synced 2026-01-16 05:41:18 -05:00
Code Issues Packages Projects Releases Wiki Activity
Files
08f3c4311a8dc2c7d5a57472574af833ed842782
coredns/plugin/file/wildcard.go

14 lines
266 B
Go
Raw Normal View History

middleware/file: fix delegations (#376) Fix the delegation handling in the *file* and *dnssec* middleware. Refactor tests a bit and show that they are failling. Add a Tree printer, cleanups and tests. Fix wildcard test - should get no answer from empty-non-terminal
2016-11-05 14:39:49 +00:00
package file
import "github.com/miekg/dns"
fix some comments (#6052) Signed-off-by: cui fliter <imcusg@gmail.com>
2023-04-25 23:25:07 +08:00
// replaceWithAsteriskLabel replaces the left most label with '*'.
middleware/file: fix delegations (#376) Fix the delegation handling in the *file* and *dnssec* middleware. Refactor tests a bit and show that they are failling. Add a Tree printer, cleanups and tests. Fix wildcard test - should get no answer from empty-non-terminal
2016-11-05 14:39:49 +00:00
func replaceWithAsteriskLabel(qname string) (wildcard string) {
i, shot := dns.NextLabel(qname, 0)
if shot {
return ""
}
return "*." + qname[i:]
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.25.3 Page: 204ms Template: 2ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API