mirror of
https://github.com/LibreQoE/LibreQoS.git
synced 2025-02-25 18:55:32 -06:00
Allow CORS to the local-api
This commit is contained in:
parent
f37c95612e
commit
a73e3af50a
@ -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"
|
||||
|
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user