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-12 20:01:18 -05:00
Code Issues Packages Projects Releases Wiki Activity
Files
0ef4b55d8d7c87a5f2e43e2fbb22cdef0a2e7b26
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: 92ms 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