Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
kariy committed Dec 9, 2024
1 parent c000ff4 commit e69db8f
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions crates/katana/rpc/rpc/src/cors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,3 +136,19 @@ impl From<Vec<HeaderValue>> for AllowOrigins {
Self::list(vec)
}
}

#[cfg(test)]
mod tests {
use super::*;

#[test]
fn wildcard_in_list() {
let origins = vec![
HeaderValue::from_static("http://example.com"),
HeaderValue::from_static("*"),
HeaderValue::from_static("http://other.com"),
];

let _ = AllowOrigins::list(origins);
}
}

0 comments on commit e69db8f

Please sign in to comment.