mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-07-17 20:05:24 +02:00
refactor(domain): simplify custom entrypoint checks in Docker and Traefik utilities
- Updated conditional checks for customEntrypoint to use a more concise syntax. - Ensured consistent handling of HTTPS configurations across domain management functions. - Improved code readability and maintainability by streamlining logic in addDomainToCompose and manageDomain functions.
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user