fix(certificate-manager, smart-proxy): Fix race condition in ACME certificate provisioning and refactor certificate manager initialization to defer provisioning until after port listeners are active
This commit is contained in:
@ -132,8 +132,9 @@ export class SmartCertManager {
|
||||
}
|
||||
}
|
||||
|
||||
// Provision certificates for all routes
|
||||
await this.provisionAllCertificates();
|
||||
// Skip automatic certificate provisioning during initialization
|
||||
// This will be called later after ports are listening
|
||||
console.log('Certificate manager initialized. Deferring certificate provisioning until after ports are listening.');
|
||||
|
||||
// Start renewal timer
|
||||
this.startRenewalTimer();
|
||||
@ -142,7 +143,7 @@ export class SmartCertManager {
|
||||
/**
|
||||
* Provision certificates for all routes that need them
|
||||
*/
|
||||
private async provisionAllCertificates(): Promise<void> {
|
||||
public async provisionAllCertificates(): Promise<void> {
|
||||
const certRoutes = this.routes.filter(r =>
|
||||
r.action.tls?.mode === 'terminate' ||
|
||||
r.action.tls?.mode === 'terminate-and-reencrypt'
|
||||
|
Reference in New Issue
Block a user