From bc3cb2d63f942f221bb91b4bde31fd1c93cd79df Mon Sep 17 00:00:00 2001 From: Philipinho <16838612+Philipinho@users.noreply.github.com> Date: Wed, 7 May 2025 15:10:58 +0100 Subject: [PATCH] fix: increase random subdomain suffix --- apps/server/src/core/workspace/services/workspace.service.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/server/src/core/workspace/services/workspace.service.ts b/apps/server/src/core/workspace/services/workspace.service.ts index eb42f9e9..d6359893 100644 --- a/apps/server/src/core/workspace/services/workspace.service.ts +++ b/apps/server/src/core/workspace/services/workspace.service.ts @@ -387,14 +387,14 @@ export class WorkspaceService { .replace(/[^a-z0-9]/g, '') .substring(0, 20); // Ensure we leave room for a random suffix. - const maxSuffixLength = 3; + const maxSuffixLength = 6; if (subdomain.length < 4) { subdomain = `${subdomain}-${generateRandomSuffix(maxSuffixLength)}`; } if (DISALLOWED_HOSTNAMES.includes(subdomain)) { - subdomain = `myworkspace-${generateRandomSuffix(maxSuffixLength)}`; + subdomain = `workspace-${generateRandomSuffix(maxSuffixLength)}`; } let uniqueHostname = subdomain;