diff --git a/packages/server/src/utils/docker/domain.ts b/packages/server/src/utils/docker/domain.ts index 48189d08a..e28f3e2f4 100644 --- a/packages/server/src/utils/docker/domain.ts +++ b/packages/server/src/utils/docker/domain.ts @@ -177,7 +177,7 @@ export const addDomainToCompose = async ( domain, domain.customEntrypoint || "web", ); - if (domain.customEntrypoint == null && https) { + if (!domain.customEntrypoint && https) { const httpsLabels = createDomainLabels(appName, domain, "websecure"); httpLabels.push(...httpsLabels); } @@ -289,7 +289,7 @@ export const createDomainLabels = ( if (stripPath && path && path !== "/") { const middlewareName = `stripprefix-${appName}-${uniqueConfigKey}`; // Only define middleware once (on web entrypoint) - if (entrypoint === "web" || customEntrypoint != null) { + if (entrypoint === "web" || customEntrypoint) { labels.push( `traefik.http.middlewares.${middlewareName}.stripprefix.prefixes=${path}`, ); @@ -301,7 +301,7 @@ export const createDomainLabels = ( if (internalPath && internalPath !== "/" && internalPath.startsWith("/")) { const middlewareName = `addprefix-${appName}-${uniqueConfigKey}`; // Only define middleware once (on web entrypoint) - if (entrypoint === "web" || customEntrypoint != null) { + if (entrypoint === "web" || customEntrypoint) { labels.push( `traefik.http.middlewares.${middlewareName}.addprefix.prefix=${internalPath}`, ); @@ -317,7 +317,7 @@ export const createDomainLabels = ( } // Add TLS configuration for websecure - if (entrypoint === "websecure" || (customEntrypoint != null && https)) { + if (entrypoint === "websecure" || (customEntrypoint && https)) { if (certificateType === "letsencrypt") { labels.push( `traefik.http.routers.${routerName}.tls.certresolver=letsencrypt`, diff --git a/packages/server/src/utils/traefik/domain.ts b/packages/server/src/utils/traefik/domain.ts index 9fe8e36c9..0f438d000 100644 --- a/packages/server/src/utils/traefik/domain.ts +++ b/packages/server/src/utils/traefik/domain.ts @@ -35,7 +35,7 @@ export const manageDomain = async (app: ApplicationNested, domain: Domain) => { domain.customEntrypoint || "web", ); - if (domain.customEntrypoint == null && domain.https) { + if (!domain.customEntrypoint && domain.https) { config.http.routers[routerNameSecure] = await createRouterConfig( app, domain, @@ -181,7 +181,7 @@ export const createRouterConfig = async ( } } - if (entryPoint === "websecure" || (customEntrypoint != null && https)) { + if (entryPoint === "websecure" || (customEntrypoint && https)) { if (certificateType === "letsencrypt") { routerConfig.tls = { certResolver: "letsencrypt" }; } else if (certificateType === "custom" && domain.customCertResolver) {