Skip to content

Commit

Permalink
cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
sdankel committed May 2, 2024
1 parent 3db123b commit d13dc3e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/cors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ fn get_allowed_origin(headers: &HeaderMap<'_>) -> Option<String> {
}

// If the request origin matches the allowed regex, allow only the request origin.
let re = Regex::new(r"^https://forc(((.pub)|((-pub)(-git-[a-zA-Z0-9-]+-fuel-labs)?\.vercel\.app)))$").unwrap();
let re = Regex::new(
r"^https://forc(((.pub)|((-pub)(-git-[a-zA-Z0-9-]+-fuel-labs)?\.vercel\.app)))$",
)
.unwrap();
if re.is_match(req_origin) {
return Some(req_origin.to_string());
}
Expand Down

0 comments on commit d13dc3e

Please sign in to comment.