diff --git a/apps/api/src/index.ts b/apps/api/src/index.ts index 362049263..793504c90 100644 --- a/apps/api/src/index.ts +++ b/apps/api/src/index.ts @@ -26,7 +26,8 @@ declare module 'fastify' { const port = isDev ? 3001 : 3000; const host = '0.0.0.0'; const fastify = Fastify({ - logger: false + logger: false, + trustProxy: true }); const schema = { type: 'object', diff --git a/apps/api/src/lib/common.ts b/apps/api/src/lib/common.ts index a9a7da877..58868e599 100644 --- a/apps/api/src/lib/common.ts +++ b/apps/api/src/lib/common.ts @@ -202,6 +202,7 @@ export async function checkDomainsIsValidInDNS({ hostname, fqdn, dualCerts }): P const domainDualCert = domain.includes('www.') ? domain.replace('www.', '') : `www.${domain}`; dns.setServers(['1.1.1.1', '8.8.8.8']); let resolves = []; + console.log(hostname) try { if (isIP(hostname)) { resolves = [hostname]; @@ -209,7 +210,7 @@ export async function checkDomainsIsValidInDNS({ hostname, fqdn, dualCerts }): P resolves = await dns.resolve4(hostname); } } catch (error) { - throw { status: 500, message: `DNS not set correctly or propogated.
Please check your DNS settings.` } + throw { status: 500, message: `Could not determine IP address for ${hostname}.` } } if (dualCerts) {