From db64f39092d15b21d15b2cc9302c11828983069a Mon Sep 17 00:00:00 2001 From: SoraSuegami Date: Wed, 18 Dec 2024 20:22:35 +0900 Subject: [PATCH] Remove _transform_headers() --- src/dns_client/src/lib.rs | 33 ++------------------------------- 1 file changed, 2 insertions(+), 31 deletions(-) diff --git a/src/dns_client/src/lib.rs b/src/dns_client/src/lib.rs index e43fc41..9d131d6 100644 --- a/src/dns_client/src/lib.rs +++ b/src/dns_client/src/lib.rs @@ -130,7 +130,7 @@ fn transform(raw: TransformArgs) -> HttpResponse { Err(e) => HttpResponse { status: Nat::from(500u64), body: e.as_bytes().to_vec(), - headers: _transform_headers(), + headers: vec![], ..Default::default() }, } @@ -218,7 +218,7 @@ fn _transform(raw: TransformArgs) -> Result { return Ok(HttpResponse { status: raw.response.status.clone(), body: pubkey_bytes.n().to_bytes_be().to_vec(), - headers: _transform_headers(), + headers: vec![], ..Default::default() }); } @@ -226,35 +226,6 @@ fn _transform(raw: TransformArgs) -> Result { Err("No key found".to_string()) } -fn _transform_headers() -> Vec { - vec![ - HttpHeader { - name: "Content-Security-Policy".to_string(), - value: "default-src 'self'".to_string(), - }, - HttpHeader { - name: "Referrer-Policy".to_string(), - value: "strict-origin".to_string(), - }, - HttpHeader { - name: "Permissions-Policy".to_string(), - value: "geolocation=(self)".to_string(), - }, - HttpHeader { - name: "Strict-Transport-Security".to_string(), - value: "max-age=63072000".to_string(), - }, - HttpHeader { - name: "X-Frame-Options".to_string(), - value: "DENY".to_string(), - }, - HttpHeader { - name: "X-Content-Type-Options".to_string(), - value: "nosniff".to_string(), - }, - ] -} - ic_cdk::export_candid!(); #[cfg(test)]