Skip to content

Commit

Permalink
CORS support
Browse files Browse the repository at this point in the history
  • Loading branch information
rubyroobs committed Oct 11, 2024
1 parent 250bd4b commit 8895c53
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/protocol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,11 @@ impl Protocol {
});
}

headers.push(HttpHeaderEntry {
name: "Access-Control-Allow-Origin".to_string(),
value: "*".to_string(),
});

// Headers
stream.write_all(&b"HTTP/1.1 "[..]).await?;
stream.write_all(status.to_string().as_bytes()).await?;
Expand Down

0 comments on commit 8895c53

Please sign in to comment.