An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.
PHP coolifydatabasesdeploymentdockerdocker-composeinertiajslaravelmariadbmysqlnextjsnodejsphppostgresredisself-hostedself-hostingserverstatic-sitesveltesvelte5
fix: Hostname issue
Andras Bacsaic63237684a25
diff --git a/apps/api/src/lib/common.ts b/apps/api/src/lib/common.tsindex 58868e5996..b1150ef368 100644--- a/apps/api/src/lib/common.ts+++ b/apps/api/src/lib/common.ts@@ -202,7 +202,6 @@ export async function checkDomainsIsValidInDNS({ hostname, fqdn, dualCerts }): Pconst 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];diff --git a/apps/api/src/routes/api/v1/applications/handlers.ts b/apps/api/src/routes/api/v1/applications/handlers.tsindex 3b7ec835a7..9465d33cab 100644--- a/apps/api/src/routes/api/v1/applications/handlers.ts+++ b/apps/api/src/routes/api/v1/applications/handlers.ts@@ -324,7 +324,7 @@ export async function checkDNS(request: FastifyRequest<CheckDNS>) {}}if (isDNSCheckEnabled && !isDev && !forceSave) {- return await checkDomainsIsValidInDNS({ hostname: request.hostname, fqdn, dualCerts });+ return await checkDomainsIsValidInDNS({ hostname: request.hostname.split(':')[0], fqdn, dualCerts });}return {}} catch ({ status, message }) {diff --git a/apps/api/src/routes/api/v1/settings/handlers.ts b/apps/api/src/routes/api/v1/settings/handlers.tsindex d60ef7b6aa..f2bb90812a 100644--- a/apps/api/src/routes/api/v1/settings/handlers.ts+++ b/apps/api/src/routes/api/v1/settings/handlers.ts@@ -67,7 +67,7 @@ export async function checkDomain(request: FastifyRequest, reply: FastifyReply)throw "Domain already configured";}if (isDNSCheckEnabled && !forceSave) {- return await checkDomainsIsValidInDNS({ hostname: request.hostname, fqdn, dualCerts });+ return await checkDomainsIsValidInDNS({ hostname: request.hostname.split(':')[0], fqdn, dualCerts });}return {};} catch ({ status, message }) {