(origin: &str)
| 427 | Lazy::new(|| RwLock::new(HashSet::new())); |
| 428 | |
| 429 | fn normalize_origin(origin: &str) -> Option<String> { |
| 430 | let trimmed = origin.trim().trim_end_matches('/'); |
| 431 | if trimmed.is_empty() { |
| 432 | None |
| 433 | } else { |
| 434 | Some(trimmed.to_string()) |
| 435 | } |
| 436 | } |
| 437 | |
| 438 | pub fn set_cors_whitelist(origins: Vec<String>) { |
| 439 | let mut next = HashSet::new(); |
no test coverage detected