diff options
Diffstat (limited to 'src/api/core/mod.rs')
-rw-r--r-- | src/api/core/mod.rs | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/api/core/mod.rs b/src/api/core/mod.rs index 3919d2a6..7712ea82 100644 --- a/src/api/core/mod.rs +++ b/src/api/core/mod.rs @@ -46,15 +46,14 @@ pub fn events_routes() -> Vec<Route> { // // Move this somewhere else // -use rocket::{serde::json::Json, Catcher, Route}; -use serde_json::Value; +use rocket::{serde::json::Json, serde::json::Value, Catcher, Route}; use crate::{ api::{JsonResult, JsonUpcase, Notify, UpdateType}, auth::Headers, db::DbConn, error::Error, - util::get_reqwest_client, + util::{get_reqwest_client, parse_experimental_client_feature_flags}, }; #[derive(Serialize, Deserialize, Debug)] @@ -192,6 +191,7 @@ fn version() -> Json<&'static str> { #[get("/config")] fn config() -> Json<Value> { let domain = crate::CONFIG.domain(); + let feature_states = parse_experimental_client_feature_flags(&crate::CONFIG.experimental_client_feature_flags()); Json(json!({ // Note: The clients use this version to handle backwards compatibility concerns // This means they expect a version that closely matches the Bitwarden server version @@ -212,13 +212,7 @@ fn config() -> Json<Value> { "notifications": format!("{domain}/notifications"), "sso": "", }, - "featureStates": { - // Any feature flags that we want the clients to use - // Can check the enabled ones at: - // https://vault.bitwarden.com/api/config - "fido2-vault-credentials": true, // Passkey support - "autofill-v2": false, // Disabled because it is causing issues https://github.com/dani-garcia/vaultwarden/discussions/4052 - }, + "featureStates": feature_states, "object": "config", })) } |