mirror of
https://github.com/coredns/coredns.git
synced 2025-10-28 08:44:17 -04:00
plugin/acl: add the ability to filter records (#4389)
Currently ACLs only allow for allow and block, however it isn't always desirable to set the status code to REFUSED. Often times you want to completely hide the fact that those records even exist. Adding the ability to acl to filter results makes it significantly harder for a third party to know that the records are being masked. Signed-off-by: George Shammas <george@shamm.as>
This commit is contained in:
@@ -42,6 +42,13 @@ func TestSetup(t *testing.T) {
|
||||
}`,
|
||||
false,
|
||||
},
|
||||
{
|
||||
"Filter 1",
|
||||
`acl {
|
||||
filter type A net 192.168.0.0/16
|
||||
}`,
|
||||
false,
|
||||
},
|
||||
{
|
||||
"Whitelist 1",
|
||||
`acl {
|
||||
@@ -153,6 +160,13 @@ func TestSetup(t *testing.T) {
|
||||
}`,
|
||||
false,
|
||||
},
|
||||
{
|
||||
"Filter 1 IPv6",
|
||||
`acl {
|
||||
filter type A net 2001:0db8:85a3:0000:0000:8a2e:0370:7334
|
||||
}`,
|
||||
false,
|
||||
},
|
||||
{
|
||||
"Whitelist 1 IPv6",
|
||||
`acl {
|
||||
|
||||
Reference in New Issue
Block a user