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: If DNS not found, do not redirect
Andras Bacsaicab7ac7d5814
diff --git a/src/routes/settings/index.json.ts b/src/routes/settings/index.json.tsindex 217b314bd0..bd365d5e43 100644--- a/src/routes/settings/index.json.ts+++ b/src/routes/settings/index.json.ts@@ -1,3 +1,4 @@+import { dev } from '$app/env';import { getDomain, getUserDetails } from '$lib/common';import * as db from '$lib/database';import { listSettings, ErrorHandler } from '$lib/database';@@ -43,7 +44,13 @@ export const del: RequestHandler = async (event) => {if (status === 401) return { status, body };const { fqdn } = await event.request.json();- const ip = await dns.resolve(event.url.hostname);+ let ip;+ console.log(fqdn);+ try {+ ip = await dns.resolve(fqdn);+ } catch (error) {+ // Do not care.+ }try {const domain = getDomain(fqdn);await db.prisma.setting.update({ where: { fqdn }, data: { fqdn: null } });@@ -53,7 +60,7 @@ export const del: RequestHandler = async (event) => {status: 200,body: {message: 'Domain removed',- redirect: `http://${ip[0]}:3000/settings`+ redirect: ip ? `http://${ip[0]}:3000/settings` : undefined}};} catch (error) {