pub struct AdminConfig {
pub enabled: bool,
pub path: String,
pub logo: Option<String>,
pub gravatar: bool,
pub ai_assistance: AdminAiAssistanceConfig,
}Expand description
The built-in admin dashboard, served from the binary itself.
Every app gets one, and there is only one: the interface is embedded in
apiplant and its manifest is derived from the app on boot. Turn it off for
a deployment that shouldn’t expose an operator console at all — an app that
wants its own can serve one from public/ like any other page.
Fields§
§enabled: boolServe the admin dashboard (default true).
path: StringPath the dashboard is served at, outside base_path.
logo: Option<String>Image shown in place of the apiplant mark, as a URL the browser can
fetch — usually a file in public/. Unset keeps the apiplant mark.
gravatar: boolFall back to Gravatar for an account with no avatar_url of its own,
using the hash of its email address (default false).
Off by default because it is a request to a third party for every face the dashboard draws, and the hash of an address is enough to confirm a guess at it. A deployment that would rather not tell gravatar.com who its users are should leave this alone; the dashboard falls back to initials, which need nobody’s help.
Turning this on is not enough on its own: the dashboard hashes the
address with WebCrypto, which browsers only expose in a secure context.
Reached over plain http at anything other than localhost or
127.0.0.1 — http://0.0.0.0:8099/admin/, a LAN address — there is no
crypto.subtle and every face falls back to initials. What the server
binds to does not matter; the address in the URL bar does.
ai_assistance: AdminAiAssistanceConfigOptional AI help for writing text in the admin dashboard.
Trait Implementations§
Source§impl Clone for AdminConfig
impl Clone for AdminConfig
Source§fn clone(&self) -> AdminConfig
fn clone(&self) -> AdminConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more