Use dns.IsSubDomain (#112)
For the match function use the proper thing from go dns. Fix all callers and tests to use this. Fixes: #107
This commit is contained in:
parent
842953f179
commit
25cf16af0e
8 changed files with 22 additions and 22 deletions
|
@ -70,7 +70,7 @@ func TestAllowedPaths(t *testing.T) {
|
|||
for i, test := range tests {
|
||||
isAllowed := upstream.IsAllowedPath(test.name)
|
||||
if test.expected != isAllowed {
|
||||
t.Errorf("Test %d: expected %v found %v", i+1, test.expected, isAllowed)
|
||||
t.Errorf("Test %d: expected %v found %v for %s", i+1, test.expected, isAllowed, test.name)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue