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:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user