mirror of
https://github.com/fosrl/pangolin.git
synced 2026-01-29 06:10:47 +00:00
add logger
This commit is contained in:
committed by
Owen Schwartz
parent
662e63317b
commit
bd20bb0dd1
@@ -403,25 +403,29 @@ export async function getTraefikConfig(
|
||||
|
||||
const rule = `Host(\`${fullDomain}\`)`;
|
||||
|
||||
console.log('DEBUG: Generated rule:', rule); // Should show: Host(`pangolin.pallavi.fosrl.io`)
|
||||
|
||||
config_output.http.routers[maintenanceRouterName] = {
|
||||
entryPoints: [resource.ssl ? entrypointHttps : entrypointHttp],
|
||||
service: maintenanceServiceName,
|
||||
middlewares: [rewriteMiddlewareName],
|
||||
rule,
|
||||
rule: rule,
|
||||
priority: 2000,
|
||||
...(resource.ssl ? { tls } : {})
|
||||
};
|
||||
|
||||
if (resource.ssl) {
|
||||
config_output.http.routers[`${maintenanceRouterName}-redirect`] = {
|
||||
config_output.http.routers[`${maintenanceRouterName}-redirect`] = {
|
||||
entryPoints: [entrypointHttp],
|
||||
middlewares: [redirectHttpsMiddlewareName, rewriteMiddlewareName],
|
||||
service: maintenanceServiceName,
|
||||
rule,
|
||||
rule: rule,
|
||||
priority: 2000
|
||||
};
|
||||
}
|
||||
|
||||
logger.info(`Maintenance mode active for ${fullDomain}`);
|
||||
|
||||
continue;
|
||||
}
|
||||
const domainParts = fullDomain.split(".");
|
||||
|
||||
Reference in New Issue
Block a user