From c54ddf75aedb65acabadb5545ac760418d8a28d4 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Thu, 8 Feb 2024 05:35:03 +0000 Subject: [PATCH] Include an octet-stream header/CORS headers in proof responses --- src/http.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; }); -- 2.39.5