From 01e3d8564a6307a7af2b5f4afe6a466bf45d7307 Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 3 Nov 2026 00:06:24 +0100 Subject: config: dashboard-url requires dashboard feature --- src/config/mod.rs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/config/mod.rs') diff --git a/src/config/mod.rs b/src/config/mod.rs index a1011ee..628f0ff 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -247,7 +247,7 @@ pub(crate) const OPTIONS: &[OptionSpec] = &[ Kind::Text, "URL", None, - "Where people reach this node's dashboard (http:// or https://, e.g. behind a reverse proxy). Published in the swarm's member list: the other nodes' dashboards open it on a double-click on this node.", + "Where people reach this node's dashboard (http:// or https://, e.g. behind a reverse proxy). Published in the swarm's member list: the other nodes' dashboards open it on a double-click on this node. A build without the dashboard feature warns and publishes none (removing one published before).", ), option( "keepalive", @@ -1544,6 +1544,16 @@ fn resolve(merged: Layer, files: Vec) -> Result { settings.alias = settings.alias.map(|alias| alias.trim().to_owned()); settings.transports = settings.ordered_transports(); settings.check().context("invalid configuration")?; + // No dashboard to be reached there: none is published (and one published before is + // removed, `swarm::members`). + if !cfg!(feature = "dashboard") + && let Some(url) = settings.dashboard_url.take() + { + warn!( + url = %url, + "dashboard-url is set, but this build has no dashboard (the dashboard feature); not publishing it" + ); + } Ok(Loaded { settings, origins: merged -- cgit v1.3.1