Skip to content

Commit

Permalink
Fix CORS on chrome by disabling block_on_origin_mismatch (#547)
Browse files Browse the repository at this point in the history
This fixes an issue specific to chrome browser where default build
was not serving the console UI.
  • Loading branch information
trueleo authored Oct 30, 2023
1 parent 5052df1 commit 442ca48
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/src/handlers/http.rs
Original file line number Diff line number Diff line change
Expand Up @@ -338,8 +338,8 @@ pub fn metrics_path() -> String {

fn cross_origin_config() -> Cors {
if cfg!(feature = "debug") {
Cors::permissive()
Cors::permissive().block_on_origin_mismatch(false)
} else {
Cors::default()
Cors::default().block_on_origin_mismatch(false)
}
}

0 comments on commit 442ca48

Please sign in to comment.