mirror of
https://github.com/andwati/dokploy.git
synced 2026-11-07 04:22:16 +00:00
fix: replace traefik.me with sslip.io for auto-generated domains
Fixes #4365 — traefik.me had availability issues. sslip.io uses the same IP-in-subdomain format, supports both IPv4 and IPv6, and is more reliable.
This commit is contained in:
@@ -38,15 +38,15 @@ export const generateRandomDomain = ({
|
||||
const slugIp = serverIp.replaceAll(".", "-").replaceAll(":", "-");
|
||||
|
||||
// Domain labels have a max length of 63 characters
|
||||
// Reserve space for: hash (6) + separators (1-2) + ip section + dot + traefik.me (10)
|
||||
// Approx: 6 + 2 + (variable ip length) + 11 = ~19-30 chars for other parts
|
||||
// Reserve space for: hash (6) + separators (1-2) + ip section + dot + sslip.io (8)
|
||||
// Approx: 6 + 2 + (variable ip length) + 9 = ~19-30 chars for other parts
|
||||
const maxProjectNameLength = 40;
|
||||
const truncatedProjectName =
|
||||
projectName.length > maxProjectNameLength
|
||||
? projectName.substring(0, maxProjectNameLength)
|
||||
: projectName;
|
||||
|
||||
return `${truncatedProjectName}-${hash}${slugIp === "" ? "" : `-${slugIp}`}.traefik.me`;
|
||||
return `${truncatedProjectName}-${hash}${slugIp === "" ? "" : `-${slugIp}`}.sslip.io`;
|
||||
};
|
||||
|
||||
export const generateHash = (length = 8): string => {
|
||||
|
||||
Reference in New Issue
Block a user