(origin: &str)
| 458 | } |
| 459 | |
| 460 | fn is_allowed_origin(origin: &str) -> bool { |
| 461 | origin.starts_with("http://localhost:") |
| 462 | || origin.starts_with("http://127.0.0.1:") |
| 463 | || origin == "tauri://localhost" |
| 464 | || origin == "http://tauri.localhost" |
| 465 | || origin == "https://tauri.localhost" |
| 466 | || (origin.starts_with("https://") && origin.ends_with(".opencode.ai")) |
| 467 | || is_extra_allowed_origin(origin) |
| 468 | } |
| 469 | |
| 470 | fn cors_layer() -> CorsLayer { |
| 471 | CorsLayer::new() |
nothing calls this directly
no test coverage detected