feat: limited CORS headers
This commit is contained in:
parent
4d82105da8
commit
8c7d34b5dd
1 changed files with 3 additions and 0 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue