Commit 2393058c authored by Marcelo Alejo Calle's avatar Marcelo Alejo Calle
Browse files

opcion para configurar ip del dns a consultar

parent a1fac635
......@@ -54,6 +54,10 @@ module.exports = async function (configApp, listaNegra, listaInstitucional, list
}
});
if (!configApp.extra) {
configApp.extra = { dns: ['8.8.8.8'] };
}
const sequelize = new Sequelize(config);
// Cargando modelo
......@@ -69,7 +73,7 @@ module.exports = async function (configApp, listaNegra, listaInstitucional, list
let services = Services(params, Sequelize);
// Cargando servicios dns
services = Object.assign(services, Dns(services));
services = Object.assign(services, Dns(services, configApp.extra));
async function insertarLista (listaDominios, tipo, estado) {
if (listaDominios && listaDominios.length > 0) {
......
......@@ -3,7 +3,9 @@
const debug = require('debug')('app:dns:verificarCorreo');
const dns = require('dns');
module.exports = function dnsService (services) {
module.exports = function dnsService (services, config) {
dns.setServers(config.dns);
let listaDominios = {
count: 0,
rows: []
......
'use strict';
module.exports = function setupDNS (app) {
module.exports = function setupDNS (services, config) {
return {
dominio: {
verificarDominioCorreo: require('./correo/verificar')(app)
verificarDominioCorreo: require('./correo/verificar')(services, config)
}
};
};
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment