Skip to content

Commit

Permalink
Add an important comment
Browse files Browse the repository at this point in the history
  • Loading branch information
GRA0007 committed Dec 20, 2023
1 parent 4bf0d4f commit cd7f20c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/server/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ fn cors_origins(origins: &[String]) -> &'static Vec<CorsOrigin> {
.iter()
.map(|o| {
if o.starts_with('/') && o.ends_with('/') {
// Remove the first and last slash
CorsOrigin::Regex(Regex::new(o.split_at(1).1.split_at(o.len() - 2).0).unwrap())
} else {
CorsOrigin::String(o.to_owned())
Expand Down

0 comments on commit cd7f20c

Please sign in to comment.