(response: Entity<ResponseEntity>, cx: &mut Context<Self>)
| 61 | [ |
| 62 | Self::General, |
| 63 | Self::Cache, |
| 64 | Self::Cors, |
| 65 | Self::Security, |
| 66 | Self::Other, |
| 67 | ] |
| 68 | } |
| 69 | } |
| 70 | |
| 71 | fn classify_header(name: &str) -> HeaderCategory { |
| 72 | let n = name.to_ascii_lowercase(); |
| 73 | |
| 74 | if n.starts_with("access-control-") { |
| 75 | return HeaderCategory::Cors; |
| 76 | } |
| 77 | |
| 78 | if matches!( |
| 79 | n.as_str(), |
| 80 | "cache-control" |
| 81 | | "etag" |
| 82 | | "age" |
| 83 | | "expires" |
| 84 | | "last-modified" |
| 85 | | "vary" |
no test coverage detected