mirror of
https://github.com/ershisan99/coolify.git
synced 2025-12-19 12:33:11 +00:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c63237684a | ||
|
|
792d51d93f | ||
|
|
62bfb5dacc | ||
|
|
d7fa80703d |
@@ -26,7 +26,8 @@ declare module 'fastify' {
|
|||||||
const port = isDev ? 3001 : 3000;
|
const port = isDev ? 3001 : 3000;
|
||||||
const host = '0.0.0.0';
|
const host = '0.0.0.0';
|
||||||
const fastify = Fastify({
|
const fastify = Fastify({
|
||||||
logger: false
|
logger: false,
|
||||||
|
trustProxy: true
|
||||||
});
|
});
|
||||||
const schema = {
|
const schema = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ const customConfig: Config = {
|
|||||||
length: 3
|
length: 3
|
||||||
};
|
};
|
||||||
export const isDev = process.env.NODE_ENV === 'development';
|
export const isDev = process.env.NODE_ENV === 'development';
|
||||||
export const version = '3.0.2';
|
export const version = '3.0.3';
|
||||||
|
|
||||||
export const defaultProxyImage = `coolify-haproxy-alpine:latest`;
|
export const defaultProxyImage = `coolify-haproxy-alpine:latest`;
|
||||||
export const defaultProxyImageTcp = `coolify-haproxy-tcp-alpine:latest`;
|
export const defaultProxyImageTcp = `coolify-haproxy-tcp-alpine:latest`;
|
||||||
@@ -209,7 +209,7 @@ export async function checkDomainsIsValidInDNS({ hostname, fqdn, dualCerts }): P
|
|||||||
resolves = await dns.resolve4(hostname);
|
resolves = await dns.resolve4(hostname);
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
throw `DNS not set correctly or propogated.<br>Please check your DNS settings.`
|
throw { status: 500, message: `Could not determine IP address for ${hostname}.` }
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dualCerts) {
|
if (dualCerts) {
|
||||||
@@ -231,9 +231,9 @@ export async function checkDomainsIsValidInDNS({ hostname, fqdn, dualCerts }): P
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (ipDomainFound && ipDomainDualCertFound) return { status: 200 };
|
if (ipDomainFound && ipDomainDualCertFound) return { status: 200 };
|
||||||
throw false;
|
throw { status: 500, message: `DNS not set correctly or propogated.<br>Please check your DNS settings.` }
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
throw `DNS not set correctly or propogated.<br>Please check your DNS settings.`
|
throw { status: 500, message: `DNS not set correctly or propogated.<br>Please check your DNS settings.` }
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
@@ -245,9 +245,9 @@ export async function checkDomainsIsValidInDNS({ hostname, fqdn, dualCerts }): P
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (ipDomainFound) return { status: 200 };
|
if (ipDomainFound) return { status: 200 };
|
||||||
throw false;
|
throw { status: 500, message: `DNS not set correctly or propogated.<br>Please check your DNS settings.` }
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
throw `DNS not set correctly or propogated.<br>Please check your DNS settings.`
|
throw { status: 500, message: `DNS not set correctly or propogated.<br>Please check your DNS settings.` }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -324,7 +324,7 @@ export async function checkDNS(request: FastifyRequest<CheckDNS>) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (isDNSCheckEnabled && !isDev && !forceSave) {
|
if (isDNSCheckEnabled && !isDev && !forceSave) {
|
||||||
return await checkDomainsIsValidInDNS({ hostname: request.hostname, fqdn, dualCerts });
|
return await checkDomainsIsValidInDNS({ hostname: request.hostname.split(':')[0], fqdn, dualCerts });
|
||||||
}
|
}
|
||||||
return {}
|
return {}
|
||||||
} catch ({ status, message }) {
|
} catch ({ status, message }) {
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ export async function checkDomain(request: FastifyRequest, reply: FastifyReply)
|
|||||||
throw "Domain already configured";
|
throw "Domain already configured";
|
||||||
}
|
}
|
||||||
if (isDNSCheckEnabled && !forceSave) {
|
if (isDNSCheckEnabled && !forceSave) {
|
||||||
return await checkDomainsIsValidInDNS({ hostname: request.hostname, fqdn, dualCerts });
|
return await checkDomainsIsValidInDNS({ hostname: request.hostname.split(':')[0], fqdn, dualCerts });
|
||||||
}
|
}
|
||||||
return {};
|
return {};
|
||||||
} catch ({ status, message }) {
|
} catch ({ status, message }) {
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ interface AppSession {
|
|||||||
}
|
}
|
||||||
export const loginEmail: Writable<string | undefined> = writable()
|
export const loginEmail: Writable<string | undefined> = writable()
|
||||||
export const appSession: Writable<AppSession> = writable({
|
export const appSession: Writable<AppSession> = writable({
|
||||||
version: '3.0.2',
|
version: '3.0.3',
|
||||||
userId: null,
|
userId: null,
|
||||||
teamId: null,
|
teamId: null,
|
||||||
permission: 'read',
|
permission: 'read',
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "coolify",
|
"name": "coolify",
|
||||||
"version": "3.0.2",
|
"version": "3.0.3",
|
||||||
"description": "An open-source & self-hostable Heroku / Netlify alternative.",
|
"description": "An open-source & self-hostable Heroku / Netlify alternative.",
|
||||||
"license": "AGPL-3.0",
|
"license": "AGPL-3.0",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
Reference in New Issue
Block a user