diff options
| author | tv <tv@krebsco.de> | 2026-11-07 22:35:09 +0100 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-07 22:35:09 +0100 |
| commit | 1458ea92a41788a0f33e86e621817613f46055eb (patch) | |
| tree | 8cbe202657c5f9eb006b9612d9dfa0a4b829d589 /src/node.rs | |
| parent | aea80cf1bfa39f17dbbd0b4782a71fca81e09f74 (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/node.rs')
| -rw-r--r-- | src/node.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/node.rs b/src/node.rs index c3be694..9b14447 100644 --- a/src/node.rs +++ b/src/node.rs @@ -69,6 +69,8 @@ pub(crate) struct NodeConfig { /// `--token-lifetime`, `--session-lifetime`. pub(crate) token_lifetime: Duration, pub(crate) session_lifetime: Duration, + /// `--cors-origins`. + pub(crate) cors_origins: Vec<String>, pub(crate) files: Arc<Files>, pub(crate) state_file: Option<Arc<StateFile>>, pub(crate) document_file: Option<Arc<DocumentFile>>, @@ -152,6 +154,7 @@ impl Node { node_key: config.node_key, token_lifetime: config.token_lifetime, session_lifetime: config.session_lifetime, + cors_origins: Arc::new(config.cors_origins), state_file: config.state_file, document_file: config.document_file, files: config.files, |
