diff --git a/devtools/src/http_client.rs b/devtools/src/http_client.rs index 29a6d9c7c..078c33721 100644 --- a/devtools/src/http_client.rs +++ b/devtools/src/http_client.rs @@ -102,12 +102,7 @@ pub fn request(address: &SocketAddr, request: &str) -> Response { /// Check if all required security headers are present pub fn assert_security_headers_present(headers: &[String], port: Option) { - if let Some(port) = port { - assert!( - headers.iter().find(|header| header.as_str() == &format!("X-Frame-Options: ALLOW-FROM http://127.0.0.1:{}", port)).is_some(), - "X-Frame-Options: ALLOW-FROM missing: {:?}", headers - ); - } else { + if let None = port { assert!( headers.iter().find(|header| header.as_str() == "X-Frame-Options: SAMEORIGIN").is_some(), "X-Frame-Options: SAMEORIGIN missing: {:?}", headers