Warn about unexported App Gateway changes and restart Caddy when switching hosts to self-signed

This commit is contained in:
Eduardo Silva
2026-11-18 18:00:06 -03:00
parent 8b18d683ab
commit 467bc48cce
8 changed files with 68 additions and 12 deletions
+6 -1
View File
@@ -363,10 +363,15 @@ def sync_tls_state():
restart_required = False
if applied_state is not None:
for host, host_state in pending_state.items():
if host_state[0] not in ACME_CERTIFICATE_TYPES or applied_state.get(host) in (None, host_state):
if applied_state.get(host) in (None, host_state):
continue
if "/" in host or host in ("", ".", ".."):
continue
if host_state[0] not in ACME_CERTIFICATE_TYPES:
# A cached ACME certificate would keep being served instead of the self-signed one
if has_acme_certificate(host):
restart_required = True
continue
fallback_removed = False
fallback_certificate_dir = os.path.join(CERTIFICATES_DIR, INTERNAL_ISSUER_DIR_NAME, host)
if os.path.isdir(fallback_certificate_dir):