Fetch and parse source map
(map_url: &str, client: &Client)
| 694 | |
| 695 | /// Fetch and parse source map |
| 696 | pub async fn fetch_source_map(map_url: &str, client: &Client) -> Option<SourceMap> { |
| 697 | let response = client |
| 698 | .get(map_url) |
| 699 | .timeout(Duration::from_secs(10)) |
| 700 | .send() |
| 701 | .await |
| 702 | .ok()?; |
| 703 | |
| 704 | if !response.status().is_success() { |
| 705 | return None; |
| 706 | } |
| 707 | |
| 708 | let map_text = response.text().await.ok()?; |
| 709 | serde_json::from_str::<SourceMap>(&map_text).ok() |
| 710 | } |
| 711 | |
| 712 | /// Analyze source map for secrets and information |
| 713 | pub async fn analyze_source_map( |