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 2025-10-28 16:54:15 -04:00
Code Issues Packages Projects Releases Wiki Activity
Files
384fa3285ec98a68699eba008f559a8307d8e6f9
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.24.7 Page: 82ms Template: 1ms
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