From: Matt Corallo Date: Thu, 8 Feb 2024 05:35:03 +0000 (+0000) Subject: Include an octet-stream header/CORS headers in proof responses X-Git-Tag: v0.5.4~85 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=c54ddf75aedb65acabadb5545ac760418d8a28d4;p=dnssec-prover Include an octet-stream header/CORS headers in proof responses --- diff --git a/src/http.rs b/src/http.rs index f344372..5312bbb 100644 --- a/src/http.rs +++ b/src/http.rs @@ -122,13 +122,13 @@ mod imp { }; let _ = socket.write_all( - format!("HTTP/1.1 200 OK\r\nContent-Length: {}\r\n\r\n", proof.len()).as_bytes() + format!("HTTP/1.1 200 OK\r\nContent-Length: {}\r\nContent-Type: application/octet-stream\r\nAccess-Control-Allow-Origin: *\r\n\r\n", proof.len()).as_bytes() ).await; let _ = socket.write_all(&proof).await; return; } let _ = socket.write_all(format!( - "HTTP/1.1 {}\r\nContent-Length: {}\r\nContent-Type: text/plain\r\n\r\n{}", + "HTTP/1.1 {}\r\nContent-Length: {}\r\nContent-Type: text/plain\r\nAccess-Control-Allow-Origin: *\r\n\r\n{}", response.0, response.1.len(), response.1, ).as_bytes()).await; });