Commit f8c217e3967fa2aab3fc617265b7f3a9bf80eb7b
Expand wildcards in response to match question
cel committed on 11/26/2016, 9:00:24 PMParent: 62bf745eae69b5c115dd89dccad082a66f0a83a5
Files changed
lib/query.js | changed |
lib/query.js | ||
---|---|---|
@@ -365,8 +365,19 @@ | ||
365 | 365 … | // include SOA if there are no answers, NS if there are |
366 | 366 … | result.authorities = result.authorities.filter(function (r) { |
367 | 367 … | return r.type !== (result.answers.length ? 'SOA' : 'NS'); |
368 | 368 … | }); |
369 … | + | |
370 … | + // resolve wildcards in answers | |
371 … | + result.answers = result.answers.map(function (r) { | |
372 … | + return r.name !== qName | |
373 … | + && r.name in wildcardDomains ? { | |
374 … | + name: qName, | |
375 … | + type: r.type, | |
376 … | + class: r.class, | |
377 … | + data: r.data, | |
378 … | + } : r; | |
379 … | + }) | |
369 | 380 … | } |
370 | 381 … | cb(null, result); |
371 | 382 … | })); |
372 | 383 … | }; |
Built with git-ssb-web