cluster/services/dns: don't rewrite NS and SOA requests

This commit is contained in:
Max Headroom 2023-12-30 14:12:38 +01:00
parent 71ac9de188
commit 30e926a654

View file

@ -33,7 +33,11 @@ let
maybeEscapeRegex = str: if record.rewrite.type == "regex" then "${lib.escapeRegex str}$" else str; maybeEscapeRegex = str: if record.rewrite.type == "regex" then "${lib.escapeRegex str}$" else str;
in "rewrite stop name ${record.rewrite.type} ${record.name}${maybeEscapeRegex ".${record.root}."} ${record.rewrite.target}. answer auto") recordsPartitioned.wrong; in "rewrite stop name ${record.rewrite.type} ${record.name}${maybeEscapeRegex ".${record.root}."} ${record.rewrite.target}. answer auto") recordsPartitioned.wrong;
rewriteConf = pkgs.writeText "coredns-rewrites.conf" (lib.concatStringsSep "\n" rewrites); rewriteConf = pkgs.writeText "coredns-rewrites.conf" ''
rewrite stop type NS NS
rewrite stop type SOA SOA
${lib.concatStringsSep "\n" rewrites}
'';
in { in {
links.localAuthoritativeDNS = {}; links.localAuthoritativeDNS = {};