From 9b01aecf3cfe6debe4eebedff0e3013bb8f0f21f Mon Sep 17 00:00:00 2001 From: Owen Date: Thu, 17 Jul 2025 22:37:33 -0700 Subject: [PATCH] Add default cert resovler --- server/routers/traefik/getTraefikConfig.ts | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/server/routers/traefik/getTraefikConfig.ts b/server/routers/traefik/getTraefikConfig.ts index 654f0c4a..3d5e83f0 100644 --- a/server/routers/traefik/getTraefikConfig.ts +++ b/server/routers/traefik/getTraefikConfig.ts @@ -214,11 +214,21 @@ export async function traefikConfigProvider( const configDomain = config.getDomain(resource.domainId); + let certResolver, preferWildcardCert; + if (!configDomain) { + certResolver = config.getRawConfig().traefik.cert_resolver; + preferWildcardCert = + config.getRawConfig().traefik.prefer_wildcard_cert; + } else { + certResolver = configDomain.cert_resolver; + preferWildcardCert = configDomain.prefer_wildcard_cert; + } + let tls = {}; if (configDomain) { tls = { - certResolver: configDomain.cert_resolver, - ...(configDomain.prefer_wildcard_cert + certResolver: certResolver, + ...(preferWildcardCert ? { domains: [ {