mirror of
https://github.com/fosrl/pangolin.git
synced 2026-09-11 21:41:41 +02:00
Pull in static domains to the traefik config again
This commit is contained in:
@@ -344,10 +344,6 @@ export class TraefikConfigManager {
|
|||||||
|
|
||||||
const { domains, traefikConfig } = getTraefikConfig;
|
const { domains, traefikConfig } = getTraefikConfig;
|
||||||
|
|
||||||
// Add static domains from config
|
|
||||||
// const staticDomains = [config.getRawConfig().app.dashboard_url];
|
|
||||||
// staticDomains.forEach((domain) => domains.add(domain));
|
|
||||||
|
|
||||||
// Log if domains changed
|
// Log if domains changed
|
||||||
if (
|
if (
|
||||||
this.lastActiveDomains.size !== domains.size ||
|
this.lastActiveDomains.size !== domains.size ||
|
||||||
@@ -442,13 +438,13 @@ export class TraefikConfigManager {
|
|||||||
// Always ensure all existing certificates (including wildcards) are in the config
|
// Always ensure all existing certificates (including wildcards) are in the config
|
||||||
await this.updateDynamicConfigFromLocalCerts(domains);
|
await this.updateDynamicConfigFromLocalCerts(domains);
|
||||||
} else {
|
} else {
|
||||||
const timeSinceLastFetch = this.lastCertificateFetch
|
// const timeSinceLastFetch = this.lastCertificateFetch
|
||||||
? Math.round(
|
// ? Math.round(
|
||||||
(Date.now() -
|
// (Date.now() -
|
||||||
this.lastCertificateFetch.getTime()) /
|
// this.lastCertificateFetch.getTime()) /
|
||||||
(1000 * 60)
|
// (1000 * 60)
|
||||||
)
|
// )
|
||||||
: 0;
|
// : 0;
|
||||||
|
|
||||||
// logger.debug(
|
// logger.debug(
|
||||||
// `Skipping certificate fetch - no changes detected and within 24-hour window (last fetch: ${timeSinceLastFetch} minutes ago)`
|
// `Skipping certificate fetch - no changes detected and within 24-hour window (last fetch: ${timeSinceLastFetch} minutes ago)`
|
||||||
@@ -469,7 +465,7 @@ export class TraefikConfigManager {
|
|||||||
await this.writeTraefikDynamicConfig(traefikConfig);
|
await this.writeTraefikDynamicConfig(traefikConfig);
|
||||||
|
|
||||||
// Send domains to SNI proxy
|
// Send domains to SNI proxy
|
||||||
let exitNodeForSni: (typeof exitNodes.$inferSelect) | undefined;
|
let exitNodeForSni: typeof exitNodes.$inferSelect | undefined;
|
||||||
try {
|
try {
|
||||||
if (config.getRawConfig().gerbil.exit_node_name) {
|
if (config.getRawConfig().gerbil.exit_node_name) {
|
||||||
const exitNodeName =
|
const exitNodeName =
|
||||||
@@ -489,7 +485,12 @@ export class TraefikConfigManager {
|
|||||||
await sendToExitNode(exitNodeForSni, {
|
await sendToExitNode(exitNodeForSni, {
|
||||||
localPath: "/update-local-snis",
|
localPath: "/update-local-snis",
|
||||||
method: "POST",
|
method: "POST",
|
||||||
data: { fullDomains: Array.from(domains) }
|
data: {
|
||||||
|
fullDomains: [
|
||||||
|
...Array.from(domains),
|
||||||
|
...config.getRawConfig().traefik.static_domains
|
||||||
|
]
|
||||||
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
logger.warn(
|
logger.warn(
|
||||||
|
|||||||
Reference in New Issue
Block a user