Master-URL: ongeldige of placeholder-waarde wordt nooit opgeslagen of verstuurd (master slaat achtergrondchecks over, slave weigert met 400, poller meldt invalid_master_url); veilige diagnostiek bij een mislukte poll; releasenote Master__MasterUrl

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-09 21:08:47 +01:00
co-authored by Claude Sonnet 5.5
parent 64a467b41b
commit 195443d9a9
11 changed files with 230 additions and 4 deletions
@@ -258,7 +258,17 @@ public class CmsInstanceService(MasterServiceDependencies deps) : ICmsInstanceSe
return $"{request.Scheme}://{request.Host}";
}
return deps.Options.Value.MasterUrl;
var configured = deps.Options.Value.MasterUrl;
if (!SlpModularCms.Core.Availability.MasterUrlRules.IsValid(configured))
{
// The shipped appsettings carry a placeholder here. Using it would overwrite a slave's good master
// address with garbage (the slave then fails every poll), so it counts as "not configured".
deps.Logger.LogWarning(
"MasterModule:MasterUrl is not an absolute http(s) address (set Master__MasterUrl, e.g. https://master.example.com); background checks are skipped.");
return null;
}
return configured!.Trim();
}
private static CmsInstanceDto ToDto(CmsInstance instance) => new(