Skip to content

Commit

Permalink
Fix formatting and add support for CAA record type
Browse files Browse the repository at this point in the history
  • Loading branch information
FLYBYME committed Dec 18, 2023
1 parent 12f0415 commit 7b89e21
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions services/ddns.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ module.exports = {
}
},
bind: {
params: { },
params: {},
async handler(ctx) {
const params = Object.assign({}, ctx.params);

Expand Down Expand Up @@ -460,7 +460,9 @@ module.exports = {
},
async walkRecords(name, type, address) {

if (type == 'NS' || type == 'SOA') {
if (type == 'NS' || type == 'SOA' || type == 'CAA') {
// for records that are not in the same domain as the query we need to find the NS records for the domain
// and query them for the record type
name = tld.getDomain(name.replace('*', '').replace('_', ''))
}
if (!name) {
Expand Down Expand Up @@ -859,7 +861,7 @@ module.exports = {
}
await this.createUDPServer('udp4', 53, '127.0.0.1', true);
await this.createUDPServer('udp6', 53, '::1', true);

}
if (process.env.AGENT_INTERFACE) {
const address = require('os').networkInterfaces()[process.env.AGENT_INTERFACE].shift().address
Expand Down

0 comments on commit 7b89e21

Please sign in to comment.