1
0
mirror of https://github.com/StackExchange/dnscontrol.git synced 2024-05-11 05:55:12 +00:00

FEATURE: Add rTypes restrictions to IGNORE_NAME (#1808)

Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
This commit is contained in:
Dragos Harabor
2022-11-07 08:27:04 -08:00
committed by GitHub
parent 4b3d8f724e
commit 68516025a5
12 changed files with 121 additions and 39 deletions

View File

@ -584,10 +584,13 @@ function IGNORE(name) {
return IGNORE_NAME(name);
}
// IGNORE_NAME(name)
function IGNORE_NAME(name) {
// IGNORE_NAME(name, rTypes)
function IGNORE_NAME(name, rTypes) {
if (rTypes === undefined) {
rTypes = "*";
}
return function(d) {
d.ignored_names.push(name);
d.ignored_names.push({pattern: name, types: rTypes});
};
}
@ -600,7 +603,7 @@ var IGNORE_NAME_DISABLE_SAFETY_CHECK = {
// See https://github.com/StackExchange/dnscontrol/issues/1106
};
// IGNORE_TARGET(target)
// IGNORE_TARGET(target, rType)
function IGNORE_TARGET(target, rType) {
return function(d) {
d.ignored_targets.push({pattern: target, type: rType});