diff --git a/src/http/responses.rs b/src/http/responses.rs index e2210fa..d349ea9 100644 --- a/src/http/responses.rs +++ b/src/http/responses.rs @@ -44,6 +44,9 @@ fn send_response(mut stream: TcpStream, status: u16, body: Body) -> UnitOrBoxedE // Headers response.push_str("Server: luciders/0.1.0\r\n"); response.push_str("Cache-Control: immutable, public, max-age=604800\r\n"); + // CORS + response.push_str("Access-Control-Allow-Origin: *\r\n"); + response.push_str("Access-Control-Allow-Metods: GET\r\n"); response.push_str(&format!( "Content-Length: {}\r\n", match &body {