Skip to content

Commit

Permalink
Add Options as cors allowed
Browse files Browse the repository at this point in the history
  • Loading branch information
yamelsenih committed Feb 14, 2024
1 parent 509a622 commit c5c8b07
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/bin/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ async fn main() {
log::info!("Server Address: {:?}", host.clone());
let cors_handler = Cors::new()
.allow_origin(&allowed_origin.to_owned())
.allow_methods(vec![Method::GET, Method::POST, Method::DELETE]).into_handler();
.allow_methods(vec![Method::OPTIONS, Method::GET]).into_handler();
let router = Router::new()
.hoop(cors_handler)
.push(
Expand Down

0 comments on commit c5c8b07

Please sign in to comment.