Skip to content

Commit

Permalink
VERY PERMISSIVE
Browse files Browse the repository at this point in the history
  • Loading branch information
JieningYu committed Mar 28, 2024
1 parent 57073fb commit 7a5d9d0
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use dmds_tokio_fs::FsHandle;
use paper::Paper;
use question::Question;
use serde::Deserialize;
use tower_http::cors::{AllowOrigin, CorsLayer};
use tower_http::cors::{AllowHeaders, AllowOrigin, CorsLayer};

mod paper;
mod question;
Expand Down Expand Up @@ -106,7 +106,11 @@ async fn main() {
&format!("/{}/{}", config.mng_secret, config.mng_reject_papers_secret),
post(paper::reject::<FsHandle>),
)
.layer(CorsLayer::permissive().allow_origin(AllowOrigin::any()))
.layer(
CorsLayer::very_permissive()
.allow_origin(AllowOrigin::any())
.allow_headers(AllowHeaders::any()),
)
.with_state(state.clone());

tokio::spawn(dmds_tokio_fs::daemon(
Expand Down

0 comments on commit 7a5d9d0

Please sign in to comment.