fix: temporary disable dns check with dns servers

This commit is contained in:
Andras Bacsai
2023-01-10 11:50:41 +01:00
parent 68e5d4dd2c
commit 086dd89144
2 changed files with 18 additions and 12 deletions

View File

@@ -764,7 +764,9 @@ export async function checkDomain(request: FastifyRequest<CheckDomain>) {
fqdn, fqdn,
settings: { dualCerts } settings: { dualCerts }
} = await prisma.application.findUnique({ where: { id }, include: { settings: true } }); } = await prisma.application.findUnique({ where: { id }, include: { settings: true } });
return await checkDomainsIsValidInDNS({ hostname: domain, fqdn, dualCerts }); // TODO: Disabled this because it is having problems with remote docker engines.
// return await checkDomainsIsValidInDNS({ hostname: domain, fqdn, dualCerts });
return {};
} catch ({ status, message }) { } catch ({ status, message }) {
return errorHandler({ status, message }); return errorHandler({ status, message });
} }
@@ -805,11 +807,12 @@ export async function checkDNS(request: FastifyRequest<CheckDNS>) {
remoteEngine, remoteEngine,
remoteIpAddress remoteIpAddress
}); });
if (isDNSCheckEnabled && !isDev && !forceSave) { // TODO: Disabled this because it is having problems with remote docker engines.
let hostname = request.hostname.split(':')[0]; // if (isDNSCheckEnabled && !isDev && !forceSave) {
if (remoteEngine) hostname = remoteIpAddress; // let hostname = request.hostname.split(':')[0];
return await checkDomainsIsValidInDNS({ hostname, fqdn, dualCerts }); // if (remoteEngine) hostname = remoteIpAddress;
} // return await checkDomainsIsValidInDNS({ hostname, fqdn, dualCerts });
// }
return {}; return {};
} catch ({ status, message }) { } catch ({ status, message }) {
return errorHandler({ status, message }); return errorHandler({ status, message });

View File

@@ -505,7 +505,9 @@ export async function checkServiceDomain(request: FastifyRequest<CheckServiceDom
const { id } = request.params const { id } = request.params
const { domain } = request.query const { domain } = request.query
const { fqdn, dualCerts } = await prisma.service.findUnique({ where: { id } }) const { fqdn, dualCerts } = await prisma.service.findUnique({ where: { id } })
return await checkDomainsIsValidInDNS({ hostname: domain, fqdn, dualCerts }); // TODO: Disabled this because it is having problems with remote docker engines.
// return await checkDomainsIsValidInDNS({ hostname: domain, fqdn, dualCerts });
return {}
} catch ({ status, message }) { } catch ({ status, message }) {
return errorHandler({ status, message }) return errorHandler({ status, message })
} }
@@ -531,11 +533,12 @@ export async function checkService(request: FastifyRequest<CheckService>) {
throw { status: 500, message: `Domain ${getDomain(fqdn).replace('www.', '')} is already in use!` } throw { status: 500, message: `Domain ${getDomain(fqdn).replace('www.', '')} is already in use!` }
} }
if (exposePort) await checkExposedPort({ id, configuredPort, exposePort, engine, remoteEngine, remoteIpAddress }) if (exposePort) await checkExposedPort({ id, configuredPort, exposePort, engine, remoteEngine, remoteIpAddress })
if (isDNSCheckEnabled && !isDev && !forceSave) { // TODO: Disabled this because it is having problems with remote docker engines.
let hostname = request.hostname.split(':')[0]; // if (isDNSCheckEnabled && !isDev && !forceSave) {
if (remoteEngine) hostname = remoteIpAddress; // let hostname = request.hostname.split(':')[0];
return await checkDomainsIsValidInDNS({ hostname, fqdn, dualCerts }); // if (remoteEngine) hostname = remoteIpAddress;
} // return await checkDomainsIsValidInDNS({ hostname, fqdn, dualCerts });
// }
return {} return {}
} catch ({ status, message }) { } catch ({ status, message }) {
return errorHandler({ status, message }) return errorHandler({ status, message })