feat(web): manage MCP HTTP access from settings

This commit is contained in:
Hand Sonic authored and GitHub committed 2026-09-26 00:29:23 +08:00
1 parent 705ea7464d
commit fc0d576f6d
29 files changed
+1040 -159

No files matched your search

+5
View File
@@ -137,6 +137,11 @@ pub async fn setup(State(state): State<Arc<WebState>>, Json(body): Json<LoginReq
// Update in-memory state
*state.password_hash.write().await = Some(hash);
if state.migration_ready.load(std::sync::atomic::Ordering::Acquire) {
if let Err(error) = state.web_mcp.reload(&state.app.storage, true).await {
log::error!("Web MCP remained disabled after password setup: {error}");
}
}
// Auto-login: create session
let token = uuid::Uuid::new_v4().to_string();