fix: update slugIp formatting to handle colons in server IP

This commit is contained in:
Mauricio Siu
2025-05-26 00:55:22 -06:00
parent 17a26353b6
commit 6fc83f2db3

View File

@@ -35,7 +35,7 @@ export const generateRandomDomain = ({
projectName,
}: Schema): string => {
const hash = randomBytes(3).toString("hex");
const slugIp = serverIp.replaceAll(".", "-");
const slugIp = serverIp.replaceAll(".", "-").replaceAll(":", "-");
return `${projectName}-${hash}${slugIp === "" ? "" : `-${slugIp}`}.traefik.me`;
};