Skip to content
Snippets Groups Projects
Commit d7aaa4ae authored by Adrien Béraud's avatar Adrien Béraud
Browse files

proxy server: add Access-Control-Allow-Origin

parent 5a049f89
Branches
No related tags found
No related merge requests found
...@@ -64,6 +64,7 @@ DhtProxyServer::DhtProxyServer(std::shared_ptr<DhtRunner> dht, in_port_t port) ...@@ -64,6 +64,7 @@ DhtProxyServer::DhtProxyServer(std::shared_ptr<DhtRunner> dht, in_port_t port)
auto settings = std::make_shared<restbed::Settings>(); auto settings = std::make_shared<restbed::Settings>();
settings->set_default_header("Content-Type", "application/json"); settings->set_default_header("Content-Type", "application/json");
settings->set_default_header("Connection", "keep-alive"); settings->set_default_header("Connection", "keep-alive");
settings->set_default_header("Access-Control-Allow-Origin", "*");
std::chrono::milliseconds timeout(std::numeric_limits<int>::max()); std::chrono::milliseconds timeout(std::numeric_limits<int>::max());
settings->set_connection_timeout(timeout); // there is a timeout, but really huge settings->set_connection_timeout(timeout); // there is a timeout, but really huge
settings->set_port(port); settings->set_port(port);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment