Skip to content

Commit

Permalink
Add CORS header to httplib webserver
Browse files Browse the repository at this point in the history
  • Loading branch information
tindy2013 committed Dec 31, 2024
1 parent 05910ac commit 3f5ed82
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/server/webserver_httplib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ int WebServer::start_web_server_multi(listener_args *args)
{
res.set_header("Access-Control-Allow-Headers", req.get_header_value("Access-Control-Request-Headers"));
}
res.set_header("Access-Control-Allow-Origin", "*");
return httplib::Server::HandlerResponse::Unhandled;
});
for (auto &x : redirect_map)
Expand Down

0 comments on commit 3f5ed82

Please sign in to comment.