diff --git a/src/rust/lqosd/Cargo.toml b/src/rust/lqosd/Cargo.toml index 47f74f63..cef9594e 100644 --- a/src/rust/lqosd/Cargo.toml +++ b/src/rust/lqosd/Cargo.toml @@ -39,7 +39,7 @@ zerocopy = { workspace = true } fxhash = "0.2.1" axum = { version = "0.7.5", features = ["ws", "http2"] } axum-extra = { version = "0.9.3", features = ["cookie", "cookie-private"] } -tower-http = { version = "0.5.2", features = ["fs"] } +tower-http = { version = "0.5.2", features = ["fs", "cors"] } strum = { version = "0.26.3", features = ["derive"] } default-net = { workspace = true } surge-ping = "0.8.1" diff --git a/src/rust/lqosd/src/node_manager/local_api.rs b/src/rust/lqosd/src/node_manager/local_api.rs index f8b0ad72..7b8013de 100644 --- a/src/rust/lqosd/src/node_manager/local_api.rs +++ b/src/rust/lqosd/src/node_manager/local_api.rs @@ -18,9 +18,11 @@ mod flow_explorer; use axum::Router; use axum::routing::{get, post}; use crate::node_manager::auth::auth_layer; +use tower_http::cors::CorsLayer; pub fn local_api() -> Router { Router::new() + .layer(CorsLayer::very_permissive()) .route("/dashletThemes", get(dashboard_themes::list_themes)) .route("/dashletSave", post(dashboard_themes::save_theme)) .route("/dashletDelete", post(dashboard_themes::delete_theme))