mirror of
https://github.com/fosrl/pangolin.git
synced 2025-08-20 01:08:41 +02:00
Update
This commit is contained in:
parent
9bdf31ee97
commit
ffe2512734
1 changed files with 12 additions and 11 deletions
|
@ -304,9 +304,10 @@ export class TraefikConfigManager {
|
||||||
(1000 * 60)
|
(1000 * 60)
|
||||||
)
|
)
|
||||||
: 0;
|
: 0;
|
||||||
logger.debug(
|
|
||||||
`Skipping certificate fetch - no changes detected and within 24-hour window (last fetch: ${timeSinceLastFetch} minutes ago)`
|
// logger.debug(
|
||||||
);
|
// `Skipping certificate fetch - no changes detected and within 24-hour window (last fetch: ${timeSinceLastFetch} minutes ago)`
|
||||||
|
// );
|
||||||
|
|
||||||
// Still need to ensure config is up to date with existing certificates
|
// Still need to ensure config is up to date with existing certificates
|
||||||
await this.updateDynamicConfigFromLocalCerts(domains);
|
await this.updateDynamicConfigFromLocalCerts(domains);
|
||||||
|
@ -554,8 +555,8 @@ export class TraefikConfigManager {
|
||||||
const keyPath = path.join(domainDir, "key.pem");
|
const keyPath = path.join(domainDir, "key.pem");
|
||||||
|
|
||||||
const certEntry = {
|
const certEntry = {
|
||||||
certFile: `/var/${certPath}`,
|
certFile: certPath,
|
||||||
keyFile: `/var/${keyPath}`
|
keyFile: keyPath
|
||||||
};
|
};
|
||||||
dynamicConfig.tls.certificates.push(certEntry);
|
dynamicConfig.tls.certificates.push(certEntry);
|
||||||
}
|
}
|
||||||
|
@ -664,8 +665,8 @@ export class TraefikConfigManager {
|
||||||
|
|
||||||
// Always ensure the config entry exists and is up to date
|
// Always ensure the config entry exists and is up to date
|
||||||
const certEntry = {
|
const certEntry = {
|
||||||
certFile: `/var/${certPath}`,
|
certFile: certPath,
|
||||||
keyFile: `/var/${keyPath}`
|
keyFile: keyPath
|
||||||
};
|
};
|
||||||
// Remove any existing entry for this cert/key path
|
// Remove any existing entry for this cert/key path
|
||||||
dynamicConfig.tls.certificates =
|
dynamicConfig.tls.certificates =
|
||||||
|
@ -809,14 +810,14 @@ export class TraefikConfigManager {
|
||||||
this.lastLocalCertificateState.delete(dirName);
|
this.lastLocalCertificateState.delete(dirName);
|
||||||
|
|
||||||
// Remove from dynamic config
|
// Remove from dynamic config
|
||||||
const certFilePath = `/var/${path.join(
|
const certFilePath = path.join(
|
||||||
domainDir,
|
domainDir,
|
||||||
"cert.pem"
|
"cert.pem"
|
||||||
)}`;
|
);
|
||||||
const keyFilePath = `/var/${path.join(
|
const keyFilePath = path.join(
|
||||||
domainDir,
|
domainDir,
|
||||||
"key.pem"
|
"key.pem"
|
||||||
)}`;
|
);
|
||||||
const before = dynamicConfig.tls.certificates.length;
|
const before = dynamicConfig.tls.certificates.length;
|
||||||
dynamicConfig.tls.certificates =
|
dynamicConfig.tls.certificates =
|
||||||
dynamicConfig.tls.certificates.filter(
|
dynamicConfig.tls.certificates.filter(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue