From 5e823958e79c2e34f31a2ff5afe010f5a9fdee4c Mon Sep 17 00:00:00 2001 From: JieningYu Date: Thu, 28 Mar 2024 13:37:12 +0800 Subject: [PATCH] cursed --- src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index c295702..12fe378 100644 --- a/src/main.rs +++ b/src/main.rs @@ -88,7 +88,6 @@ async fn main() { }; let router: Router<()> = Router::new() - .layer(CorsLayer::permissive()) .route("/questions/new", post(question::new::)) .route("/paper/post", post(paper::post::)) .route("/paper/get", get(paper::get::)) @@ -107,7 +106,8 @@ async fn main() { &format!("/{}/{}", config.mng_secret, config.mng_reject_papers_secret), post(paper::reject::), ) - .with_state(state.clone()); + .with_state(state.clone()) + .layer(CorsLayer::very_permissive()); tokio::spawn(dmds_tokio_fs::daemon( state.papers.clone(),