Skip to content

Commit

Permalink
feat: allow cors
Browse files Browse the repository at this point in the history
  • Loading branch information
kgmyatthu committed Jan 14, 2025
1 parent 2612826 commit 9ce5b32
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/http.rs
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ pub async fn handle_request(

set_http_header(&mut response_data, "Connection", "keep-alive");
set_http_header(&mut response_data, "Keep-Alive", format!("timeout={}", config.tcp_keepalive_time_sec).as_str());
set_http_header(&mut response_data, "Access-Control-Allow-Origin", "*");

// Relay the collected response to the client
if let Err(e) = client_stream.write_all(&response_data).await {
Expand Down

0 comments on commit 9ce5b32

Please sign in to comment.