aboutsummaryrefslogtreecommitdiffstats
path: root/src/config/mod.rs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-03 00:06:24 +0100
committertv <tv@krebsco.de>2026-11-03 00:06:24 +0100
commit2c5551908a772b37c9a579817d4f8a258fbc829a (patch)
treed76da11b5f3f2097de90de00b0ee80eb132f7b73 /src/config/mod.rs
parent79fbec688346c8bbbc44d6e467540450ddec60ba (diff)
config: dashboard-url requires dashboard feature
Diffstat (limited to 'src/config/mod.rs')
-rw-r--r--src/config/mod.rs12
1 files changed, 11 insertions, 1 deletions
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<PathBuf>) -> Result<Loaded> {
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