diff options
| -rw-r--r-- | docs/example.toml | 3 | ||||
| -rw-r--r-- | src/config/mod.rs | 12 |
2 files changed, 13 insertions, 2 deletions
diff --git a/docs/example.toml b/docs/example.toml index 43fdaf1..cef5754 100644 --- a/docs/example.toml +++ b/docs/example.toml @@ -39,7 +39,8 @@ node-key-file = "/var/lib/continuum/node.key" # Where people reach this node's dashboard (http:// or https://, e.g. behind a reverse # proxy). Published in the member list: the other nodes' dashboards open it on a -# double-click on this node. +# double-click on this node. A build without the dashboard feature warns and publishes +# none (removing one published before). # dashboard-url = "https://node-1.example.com/admin/dashboard" # Only relay (libp2p circuit relay), without being a node: no document, no swarm, no 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 |
