Skip to content

Commit

Permalink
chore
Browse files Browse the repository at this point in the history
  • Loading branch information
goto-eof committed Dec 18, 2022
1 parent a6d8d53 commit 37f064b
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/route/routes_util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ fn generate_response(
}

pub async fn init_routes() -> impl Filter<Extract = impl Reply, Error = Rejection> + Clone {
let cors_allowed_origins: Vec<&str> = SETTINGS
.cors_allowed_origins
.iter()
.map(|s| s as &str)
.collect();
// let cors_allowed_origins: Vec<&str> = SETTINGS
// .cors_allowed_origins
// .iter()
// .map(|s| s as &str)
// .collect();

let cors_allowed_headers: Vec<&str> = SETTINGS
.cors_allowed_headers
Expand All @@ -61,8 +61,8 @@ pub async fn init_routes() -> impl Filter<Extract = impl Reply, Error = Rejectio
.collect();

let any_origin_3 = warp::cors()
.allow_origins(cors_allowed_origins)
// .allow_any_origin()
// .allow_origins(cors_allowed_origins)
.allow_any_origin()
.allow_headers(cors_allowed_headers)
.allow_methods(cors_allowed_methods)
.allow_credentials(true);
Expand Down

0 comments on commit 37f064b

Please sign in to comment.