aboutsummaryrefslogtreecommitdiffstats
path: root/src/state
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-07 22:35:09 +0100
committertv <tv@krebsco.de>2026-11-07 22:35:09 +0100
commit1458ea92a41788a0f33e86e621817613f46055eb (patch)
tree8cbe202657c5f9eb006b9612d9dfa0a4b829d589 /src/state
parentaea80cf1bfa39f17dbbd0b4782a71fca81e09f74 (diff)
dashboard: own links over the API, and CORS
GET /admin/dashboard/links/own and its event stream: a node's own links, as LINKS_REPLY carried them, for other members' dashboards with a token. CORS for the members' dashboard origins and --cors-origins, without credentials. Auth plan M3.
Diffstat (limited to 'src/state')
-rw-r--r--src/state/mod.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/state/mod.rs b/src/state/mod.rs
index 223c0c9..272855f 100644
--- a/src/state/mod.rs
+++ b/src/state/mod.rs
@@ -149,6 +149,8 @@ pub(crate) struct AppState {
pub(crate) node_key: Option<Arc<crate::identity::NodeKey>>,
pub(crate) token_lifetime: Duration,
pub(crate) session_lifetime: Duration,
+ /// Origins whose pages may call this node's open endpoints (`api::cors`).
+ pub(crate) cors_origins: Arc<Vec<String>>,
/// This node's own files, and how much it read and wrote them.
pub(crate) files: Arc<crate::files::Files>,
/// This node's document on disk (`--document-file`), if configured.